[Android] Reshow game menu after leaving settings
This commit is contained in:
parent
df4ecbfee1
commit
628a0d769d
|
@ -99,6 +99,7 @@ public class GalleryActivity extends AppCompatActivity implements IabBroadcastLi
|
|||
|
||||
// (arbitrary) request code for the purchase flow
|
||||
static final int RC_REQUEST = 10001;
|
||||
static final int RC_SETTINGS = 10002;
|
||||
|
||||
@Override
|
||||
protected void onNewIntent( Intent intent )
|
||||
|
@ -570,7 +571,7 @@ public class GalleryActivity extends AppCompatActivity implements IabBroadcastLi
|
|||
else if (item == 3)
|
||||
{
|
||||
Intent SettingsIntent = new Intent(finalContext, GameSettingsActivity.class);
|
||||
startActivity( SettingsIntent );
|
||||
startActivityForResult( SettingsIntent, RC_SETTINGS );
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -612,6 +613,14 @@ public class GalleryActivity extends AppCompatActivity implements IabBroadcastLi
|
|||
{
|
||||
Log.d("GalleryActivity", "onActivityResult(" + requestCode + "," + resultCode + "," + data);
|
||||
|
||||
if (requestCode == RC_SETTINGS)
|
||||
{
|
||||
File InstantSaveDir = new File(NativeExports.SettingsLoadString(SettingsID.Directory_InstantSave.getValue()));
|
||||
final File GameSaveDir = new File(InstantSaveDir,NativeExports.SettingsLoadString(SettingsID.Game_UniqueSaveDir.getValue()));
|
||||
|
||||
StartGameMenu(GameSaveDir, true);
|
||||
return;
|
||||
}
|
||||
// Check which request we're responding to
|
||||
if (requestCode == GAME_DIR_REQUEST_CODE)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue