[Android] Add Game run settings

This commit is contained in:
zilmar 2016-12-20 18:22:18 +11:00
parent c3a63f8b78
commit 862503ce43
4 changed files with 12 additions and 0 deletions

View File

@ -34,6 +34,9 @@ public enum UISettingID
SupportWindow_AlwaysShow, SupportWindow_AlwaysShow,
SupportWindow_ShowingSupportWindow, SupportWindow_ShowingSupportWindow,
SupportWindow_RunCount, SupportWindow_RunCount,
//Game Settings
Game_RunCount,
; ;
private int value; private int value;

View File

@ -12,6 +12,7 @@
#include <Project64-core/Settings/SettingType/SettingsType-Application.h> #include <Project64-core/Settings/SettingType/SettingsType-Application.h>
#include <Project64-core/Settings/SettingType/SettingsType-ApplicationIndex.h> #include <Project64-core/Settings/SettingType/SettingsType-ApplicationIndex.h>
#include <Project64-core/Settings/SettingType/SettingsType-RelativePath.h> #include <Project64-core/Settings/SettingType/SettingsType-RelativePath.h>
#include <Project64-core/Settings/SettingType/SettingsType-GameSetting.h>
#include "UISettings.h" #include "UISettings.h"
void RegisterUISettings(void) 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_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_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 + 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) void UISettingsSaveBool(UISettingID Type, bool Value)

View File

@ -36,6 +36,9 @@ enum UISettingID
SupportWindow_AlwaysShow, SupportWindow_AlwaysShow,
SupportWindow_ShowingSupportWindow, SupportWindow_ShowingSupportWindow,
SupportWindow_RunCount, SupportWindow_RunCount,
//Game Settings
Game_RunCount,
}; };
void RegisterUISettings(void); void RegisterUISettings(void);

View File

@ -163,6 +163,10 @@ void GameCpuRunning(void * /*NotUsed*/)
AddRecentRom(FileLoc.c_str()); AddRecentRom(FileLoc.c_str());
} }
g_System->RefreshGameSettings(); g_System->RefreshGameSettings();
int RunCount = UISettingsLoadDword(Game_RunCount);
WriteTrace(TraceUserInterface, TraceDebug, "Setting Run Count to %d", RunCount + 1);
UISettingsSaveDword(Game_RunCount, RunCount + 1);
} }
else else
{ {