don't pass the same player-1 data for every player

This commit is contained in:
Eric House 2012-07-01 16:01:01 -07:00
parent 5cd8ab2b33
commit 2434d85684

View file

@ -121,7 +121,7 @@ makeJRects( AndDraw* draw, int indx, XP_U16 nPlayers, const XP_Rect rects[] )
}
static jobject
makeDSIs( AndDraw* draw, int indx, XP_U16 nPlayers, const DrawScoreInfo dsi[] )
makeDSIs( AndDraw* draw, int indx, XP_U16 nPlayers, const DrawScoreInfo dsis[] )
{
XP_U16 ii;
JNIEnv* env = *draw->env;
@ -146,6 +146,7 @@ makeDSIs( AndDraw* draw, int indx, XP_U16 nPlayers, const DrawScoreInfo dsi[] )
for ( ii = 0; ii < nPlayers; ++ii ) {
jobject dsiobj = (*env)->GetObjectArrayElement( env, dsiobjs, ii );
const DrawScoreInfo* dsi = &dsis[ii];
setInt( env, dsiobj, "playerNum", dsi->playerNum );
setInt( env, dsiobj, "totalScore", dsi->totalScore );