get and save new summary in resetGame so connected games don't show in

gameslist as unconnected after being reset or copied.
This commit is contained in:
eehouse 2010-05-08 19:28:19 +00:00
parent 87f5aada74
commit cfbdfac10b
2 changed files with 6 additions and 3 deletions

View file

@ -162,11 +162,9 @@ public class GamesList extends ListActivity implements View.OnClickListener {
case R.id.list_item_reset:
Utils.resetGame( this, path, path );
Utils.saveSummary( path, null );
break;
case R.id.list_item_new_from:
String newName = Utils.resetGame( this, path );
Utils.saveSummary( newName, null );
break;
case R.id.list_item_copy:

View file

@ -158,8 +158,13 @@ public class Utils {
XwJNI.comms_setAddr( gamePtr, addr );
}
saveGame( context, gamePtr, gi, pathOut );
GameSummary summary = new GameSummary();
XwJNI.game_summarize( gamePtr, gi.nPlayers, summary );
saveSummary( pathOut, summary );
XwJNI.game_dispose( gamePtr );
}
} // resetGame
public static String[] gamesList( Context context )
{