[Android] Add Game run settings
This commit is contained in:
parent
c3a63f8b78
commit
862503ce43
|
@ -34,6 +34,9 @@ public enum UISettingID
|
|||
SupportWindow_AlwaysShow,
|
||||
SupportWindow_ShowingSupportWindow,
|
||||
SupportWindow_RunCount,
|
||||
|
||||
//Game Settings
|
||||
Game_RunCount,
|
||||
;
|
||||
|
||||
private int value;
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include <Project64-core/Settings/SettingType/SettingsType-Application.h>
|
||||
#include <Project64-core/Settings/SettingType/SettingsType-ApplicationIndex.h>
|
||||
#include <Project64-core/Settings/SettingType/SettingsType-RelativePath.h>
|
||||
#include <Project64-core/Settings/SettingType/SettingsType-GameSetting.h>
|
||||
#include "UISettings.h"
|
||||
|
||||
void RegisterUISettings(void)
|
||||
|
@ -30,6 +31,7 @@ void RegisterUISettings(void)
|
|||
g_Settings->AddHandler((SettingID)(FirstUISettings + SupportWindow_AlwaysShow), new CSettingTypeApplication("Support Project64", "Always Show", false));
|
||||
g_Settings->AddHandler((SettingID)(FirstUISettings + SupportWindow_ShowingSupportWindow), new CSettingTypeApplication("Support Project64", "Showing Support Window", false));
|
||||
g_Settings->AddHandler((SettingID)(FirstUISettings + SupportWindow_RunCount), new CSettingTypeApplication("Support Project64", "Run Count", (uint32_t)0));
|
||||
g_Settings->AddHandler((SettingID)(FirstUISettings + Game_RunCount), new CSettingTypeGame("Run Count", (uint32_t)0));
|
||||
}
|
||||
|
||||
void UISettingsSaveBool(UISettingID Type, bool Value)
|
||||
|
|
|
@ -36,6 +36,9 @@ enum UISettingID
|
|||
SupportWindow_AlwaysShow,
|
||||
SupportWindow_ShowingSupportWindow,
|
||||
SupportWindow_RunCount,
|
||||
|
||||
//Game Settings
|
||||
Game_RunCount,
|
||||
};
|
||||
|
||||
void RegisterUISettings(void);
|
||||
|
|
|
@ -163,6 +163,10 @@ void GameCpuRunning(void * /*NotUsed*/)
|
|||
AddRecentRom(FileLoc.c_str());
|
||||
}
|
||||
g_System->RefreshGameSettings();
|
||||
|
||||
int RunCount = UISettingsLoadDword(Game_RunCount);
|
||||
WriteTrace(TraceUserInterface, TraceDebug, "Setting Run Count to %d", RunCount + 1);
|
||||
UISettingsSaveDword(Game_RunCount, RunCount + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue