[Android] Add controller internal settings
This commit is contained in:
parent
3be044ba71
commit
1a02835710
|
@ -11,6 +11,7 @@
|
||||||
#include <Project64-core/Settings/SettingsClass.h>
|
#include <Project64-core/Settings/SettingsClass.h>
|
||||||
#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 "UISettings.h"
|
#include "UISettings.h"
|
||||||
|
|
||||||
void RegisterUISettings(void)
|
void RegisterUISettings(void)
|
||||||
|
@ -19,6 +20,10 @@ void RegisterUISettings(void)
|
||||||
g_Settings->AddHandler((SettingID)(FirstUISettings + Screen_Orientation), new CSettingTypeApplication("", "Screen Orientation", (uint32_t)0));
|
g_Settings->AddHandler((SettingID)(FirstUISettings + Screen_Orientation), new CSettingTypeApplication("", "Screen Orientation", (uint32_t)0));
|
||||||
g_Settings->AddHandler((SettingID)(FirstUISettings + File_RecentGameFileCount), new CSettingTypeApplication("", "Remembered Rom Files", (uint32_t)10));
|
g_Settings->AddHandler((SettingID)(FirstUISettings + File_RecentGameFileCount), new CSettingTypeApplication("", "Remembered Rom Files", (uint32_t)10));
|
||||||
g_Settings->AddHandler((SettingID)(FirstUISettings + File_RecentGameFileIndex), new CSettingTypeApplicationIndex("Recent File", "Recent Rom", Default_None));
|
g_Settings->AddHandler((SettingID)(FirstUISettings + File_RecentGameFileIndex), new CSettingTypeApplicationIndex("Recent File", "Recent Rom", Default_None));
|
||||||
|
g_Settings->AddHandler((SettingID)(FirstUISettings + TouchScreen_ButtonScale), new CSettingTypeApplication("Touch Screen", "Button Scale", (uint32_t)100));
|
||||||
|
g_Settings->AddHandler((SettingID)(FirstUISettings + TouchScreen_Layout), new CSettingTypeApplication("Touch Screen", "Layout", "Analog"));
|
||||||
|
g_Settings->AddHandler((SettingID)(FirstUISettings + Controller_ConfigFile), new CSettingTypeRelativePath("Config", "Controller.cfg"));
|
||||||
|
g_Settings->AddHandler((SettingID)(FirstUISettings + Controller_CurrentProfile), new CSettingTypeApplication("Controller", "Profile", "User"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void UISettingsSaveBool(UISettingID Type, bool Value)
|
void UISettingsSaveBool(UISettingID Type, bool Value)
|
||||||
|
@ -33,6 +38,12 @@ void UISettingsSaveDword(UISettingID Type, uint32_t Value)
|
||||||
CSettings::FlushSettings(g_Settings);
|
CSettings::FlushSettings(g_Settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void UISettingsSaveString(UISettingID Type, const std::string & Value)
|
||||||
|
{
|
||||||
|
g_Settings->SaveString((SettingID)(FirstUISettings + Type), Value);
|
||||||
|
CSettings::FlushSettings(g_Settings);
|
||||||
|
}
|
||||||
|
|
||||||
bool UISettingsLoadBool(UISettingID Type)
|
bool UISettingsLoadBool(UISettingID Type)
|
||||||
{
|
{
|
||||||
return g_Settings->LoadBool((SettingID)(FirstUISettings + Type));
|
return g_Settings->LoadBool((SettingID)(FirstUISettings + Type));
|
||||||
|
@ -42,3 +53,8 @@ uint32_t UISettingsLoadDword(UISettingID Type)
|
||||||
{
|
{
|
||||||
return g_Settings->LoadDword((SettingID)(FirstUISettings + Type));
|
return g_Settings->LoadDword((SettingID)(FirstUISettings + Type));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string UISettingsLoadStringVal(UISettingID Type)
|
||||||
|
{
|
||||||
|
return g_Settings->LoadStringVal((SettingID)(FirstUISettings + Type));
|
||||||
|
}
|
||||||
|
|
|
@ -20,15 +20,25 @@ enum UISettingID
|
||||||
//Recent Game
|
//Recent Game
|
||||||
File_RecentGameFileCount,
|
File_RecentGameFileCount,
|
||||||
File_RecentGameFileIndex,
|
File_RecentGameFileIndex,
|
||||||
|
|
||||||
|
//Touch Screen
|
||||||
|
TouchScreen_ButtonScale,
|
||||||
|
TouchScreen_Layout,
|
||||||
|
|
||||||
|
//Controller Config
|
||||||
|
Controller_ConfigFile,
|
||||||
|
Controller_CurrentProfile,
|
||||||
};
|
};
|
||||||
|
|
||||||
void RegisterUISettings(void);
|
void RegisterUISettings(void);
|
||||||
|
|
||||||
void UISettingsSaveBool(UISettingID Type, bool Value);
|
void UISettingsSaveBool(UISettingID Type, bool Value);
|
||||||
void UISettingsSaveDword(UISettingID Type, uint32_t Value);
|
void UISettingsSaveDword(UISettingID Type, uint32_t Value);
|
||||||
|
void UISettingsSaveString(UISettingID Type, const std::string & Value);
|
||||||
|
|
||||||
bool UISettingsLoadBool(UISettingID Type);
|
bool UISettingsLoadBool(UISettingID Type);
|
||||||
uint32_t UISettingsLoadDword(UISettingID Type);
|
uint32_t UISettingsLoadDword(UISettingID Type);
|
||||||
|
std::string UISettingsLoadStringVal(UISettingID Type);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
void UISettingsSaveBoolIndex(UISettingID Type, int32_t index, bool Value);
|
void UISettingsSaveBoolIndex(UISettingID Type, int32_t index, bool Value);
|
||||||
|
|
Loading…
Reference in New Issue