2018-04-02 18:30:50 +00:00
|
|
|
#include <Project64-core/Settings.h>
|
2016-06-05 01:32:57 +00:00
|
|
|
#include <Project64-core/Settings/SettingType/SettingsType-Application.h>
|
2016-09-17 03:17:51 +00:00
|
|
|
#include <Project64-core/Settings/SettingType/SettingsType-ApplicationIndex.h>
|
2016-10-01 20:24:26 +00:00
|
|
|
#include <Project64-core/Settings/SettingType/SettingsType-RelativePath.h>
|
2016-12-20 07:22:18 +00:00
|
|
|
#include <Project64-core/Settings/SettingType/SettingsType-GameSetting.h>
|
2021-10-17 18:44:07 +00:00
|
|
|
#include <Project64-core/Settings/SettingType/SettingsType-TempNumber.h>
|
|
|
|
#include <Project64-core/Version.h>
|
2016-06-05 01:32:57 +00:00
|
|
|
#include "UISettings.h"
|
|
|
|
|
|
|
|
void RegisterUISettings(void)
|
|
|
|
{
|
2021-10-17 18:44:07 +00:00
|
|
|
g_Settings->AddHandler((SettingID)AssertsVersion, new CSettingTypeApplication("Settings", "Asserts Version", (uint32_t)0));
|
|
|
|
g_Settings->AddHandler((SettingID)BuildVersion, new CSettingTypeTempNumber(VERSION_BUILD));
|
|
|
|
g_Settings->AddHandler((SettingID)ScreenOrientation, new CSettingTypeApplication("Settings", "Screen Orientation", (uint32_t)0));
|
|
|
|
g_Settings->AddHandler((SettingID)FileRecentGameFileCount, new CSettingTypeApplication("Settings", "Remembered ROM Files", (uint32_t)10));
|
|
|
|
g_Settings->AddHandler((SettingID)FileRecentGameFileIndex, new CSettingTypeApplicationIndex("Recent File", "Recent ROM", Default_None));
|
|
|
|
g_Settings->AddHandler((SettingID)TouchScreenButtonScale, new CSettingTypeApplication("Touch Screen", "Button Scale", (uint32_t)100));
|
|
|
|
g_Settings->AddHandler((SettingID)TouchScreenLayout, new CSettingTypeApplication("Touch Screen", "Layout", "Analog"));
|
|
|
|
g_Settings->AddHandler((SettingID)ControllerConfigFile, new CSettingTypeRelativePath("Config", "Controller.cfg"));
|
|
|
|
g_Settings->AddHandler((SettingID)ControllerCurrentProfile, new CSettingTypeApplication("Controller", "Profile", "User"));
|
|
|
|
g_Settings->AddHandler((SettingID)ControllerDeadzone, new CSettingTypeApplication("Controller", "Deadzone", (uint32_t)0));
|
|
|
|
g_Settings->AddHandler((SettingID)ControllerSensitivity, new CSettingTypeApplication("Controller", "Sensitivity", (uint32_t)100));
|
|
|
|
g_Settings->AddHandler((SettingID)AppInfoRunCount, new CSettingTypeGame("Run Count", (uint32_t)0));
|
2016-06-05 01:32:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void UISettingsSaveBool(UISettingID Type, bool Value)
|
|
|
|
{
|
|
|
|
g_Settings->SaveBool((SettingID)(FirstUISettings + Type), Value);
|
|
|
|
CSettings::FlushSettings(g_Settings);
|
|
|
|
}
|
|
|
|
|
|
|
|
void UISettingsSaveDword(UISettingID Type, uint32_t Value)
|
|
|
|
{
|
|
|
|
g_Settings->SaveDword((SettingID)(FirstUISettings + Type), Value);
|
|
|
|
CSettings::FlushSettings(g_Settings);
|
|
|
|
}
|
|
|
|
|
2016-10-01 20:24:26 +00:00
|
|
|
void UISettingsSaveString(UISettingID Type, const std::string & Value)
|
|
|
|
{
|
|
|
|
g_Settings->SaveString((SettingID)(FirstUISettings + Type), Value);
|
|
|
|
CSettings::FlushSettings(g_Settings);
|
|
|
|
}
|
|
|
|
|
2016-06-05 01:32:57 +00:00
|
|
|
bool UISettingsLoadBool(UISettingID Type)
|
|
|
|
{
|
|
|
|
return g_Settings->LoadBool((SettingID)(FirstUISettings + Type));
|
|
|
|
}
|
|
|
|
|
|
|
|
uint32_t UISettingsLoadDword(UISettingID Type)
|
|
|
|
{
|
|
|
|
return g_Settings->LoadDword((SettingID)(FirstUISettings + Type));
|
|
|
|
}
|
2016-10-01 20:24:26 +00:00
|
|
|
|
|
|
|
std::string UISettingsLoadStringVal(UISettingID Type)
|
|
|
|
{
|
|
|
|
return g_Settings->LoadStringVal((SettingID)(FirstUISettings + Type));
|
|
|
|
}
|