[Android] Fix load game at start

This commit is contained in:
zilmar 2017-04-30 19:24:38 +10:00
parent 26ab7f6b70
commit 5b8b51ad0d
5 changed files with 10 additions and 1 deletions

View File

@ -929,8 +929,8 @@ public class GalleryActivity extends AppCompatActivity implements IabBroadcastLi
if (ResumeGame)
{
NativeExports.SettingsSaveDword(SettingsID.Game_CurrentSaveState.getValue(), 0);
NativeExports.ExternalEvent(SystemEvent.SysEvent_LoadMachineState.getValue());
}
NativeExports.SettingsSaveBool(SettingsID.Game_LoadSaveAtStart.getValue(), ResumeGame);
// Launch the game activity
boolean isXperiaPlay = false;

View File

@ -143,6 +143,7 @@ public enum SettingsID
Game_CRC_Recalc,
Game_Transferpak_ROM,
Game_Transferpak_Sav,
Game_LoadSaveAtStart,
// General Game running info
GameRunning_LoadingInProgress,

View File

@ -118,6 +118,12 @@ CN64System::CN64System(CPlugins * Plugins, bool SavesReadOnly, bool SyncSystem)
{
m_Recomp = new CRecompiler(m_MMU_VM, m_Reg, m_EndEmulation);
}
if (g_Settings->LoadBool(Game_LoadSaveAtStart))
{
LoadState();
g_Settings->SaveBool(Game_LoadSaveAtStart, false);
}
}
WriteTrace(TraceN64System, TraceDebug, "Done");

View File

@ -148,6 +148,7 @@ enum SettingID
Game_CRC_Recalc,
Game_Transferpak_ROM,
Game_Transferpak_Sav,
Game_LoadSaveAtStart,
// General Game running info
GameRunning_LoadingInProgress,

View File

@ -221,6 +221,7 @@ void CSettings::AddHowToHandleSetting(const char * BaseDirectory)
AddHandler(Game_CRC_Recalc, new CSettingTypeGame("CRC-Recalc", Rdb_CRC_Recalc));
AddHandler(Game_Transferpak_ROM, new CSettingTypeGame("Tpak-ROM-dir", Default_None));
AddHandler(Game_Transferpak_Sav, new CSettingTypeGame("Tpak-Sav-dir", Default_None));
AddHandler(Game_LoadSaveAtStart, new CSettingTypeTempBool(false));
//User Interface
AddHandler(UserInterface_ShowCPUPer, new CSettingTypeApplication("", "Display CPU Usage", (uint32_t)false));