Set Auto rotation to default, move more settings around.

This commit is contained in:
Henrik Rydgård committed 2026-10-26 11:36:59 +01:00
1 parent 3eaae508da
commit 3aec770b22
7 files changed
+145 -132

No files matched your search

+25 -16
View File
@@ -115,27 +115,36 @@ void GameSettingsScreen::PreCreateViews() {
#endif
}
const std::vector<GameSettingsScreen::PageDef> &GameSettingsScreen::PageDefs() {
static const std::vector<PageDef> pages = {
{ "GameSettingsGeneral", "General", "I_SLIDERS", nullptr, I18NCat::SYSTEM, nullptr, &BuildGeneralSettings },
{ "GameSettingsGraphics", "Graphics", "I_DISPLAY", "graphics", I18NCat::GRAPHICS, &BuildGraphicsSettings },
{ "GameSettingsControls", "Controls", "I_CONTROLLER", "controls", I18NCat::CONTROLS, &BuildControlsSettings },
{ "GameSettingsAudio", "Audio", "I_SPEAKER_MAX", "audio", I18NCat::AUDIO, &BuildAudioSettings },
{ "GameSettingsNetworking", "Networking", "I_WIFI", "network", I18NCat::NETWORKING, &BuildNetworkingSettings },
{ "GameSettingsTools", "Tools", "I_TOOLS", "tools", I18NCat::MAINSETTINGS, &BuildToolsSettings },
{ "GameSettingsSystem", "System", "I_PSP", "system", I18NCat::SYSTEM, nullptr, &BuildSystemSettings },
{ "GameSettingsVR", "VR", nullptr, nullptr, I18NCat::VR, &BuildVRSettings },
};
return pages;
}
// One per tab.
struct PageDef {
const char *tag;
const char *title; // In MAINSETTINGS.
const char *icon;
const char *helpTag; // If null, there's no help button.
I18NCat cat;
// Null for the tabs that also take systemState_, given instead.
void (*build)(SettingsPage *page);
void (*buildWithState)(SettingsPage *page, SystemPageState *state);
};
static const PageDef pageDefs[] = {
{ "GameSettingsGeneral", "General", "I_SLIDERS", nullptr, I18NCat::SYSTEM, nullptr, &BuildGeneralSettings },
{ "GameSettingsControls", "Controls", "I_CONTROLLER", "controls", I18NCat::CONTROLS, &BuildControlsSettings },
{ "GameSettingsGraphics", "Graphics", "I_DISPLAY", "graphics", I18NCat::GRAPHICS, &BuildGraphicsSettings },
{ "GameSettingsAudio", "Audio", "I_SPEAKER_MAX", "audio", I18NCat::AUDIO, &BuildAudioSettings },
{ "GameSettingsNetworking", "Networking", "I_WIFI", "network", I18NCat::NETWORKING, &BuildNetworkingSettings },
{ "GameSettingsTools", "Tools", "I_TOOLS", "tools", I18NCat::MAINSETTINGS, &BuildToolsSettings },
{ "GameSettingsSystem", "System", "I_PSP", "system", I18NCat::SYSTEM, nullptr, &BuildSystemSettings },
{ "GameSettingsVR", "VR", nullptr, nullptr, I18NCat::VR, &BuildVRSettings },
};
void GameSettingsScreen::CreateTabs() {
using namespace UI;
int deviceType = System_GetPropertyInt(SYSPROP_DEVICE_TYPE);
bool showVR = deviceType == DEVICE_TYPE_VR || g_Config.bForceVR;
const SystemDeviceType deviceType = (SystemDeviceType)System_GetPropertyInt(SYSPROP_DEVICE_TYPE);
const bool showVR = deviceType == DEVICE_TYPE_VR || g_Config.bForceVR;
for (const PageDef &def : PageDefs()) {
for (const PageDef &def : pageDefs) {
if (def.build == &BuildVRSettings && !showVR) {
continue;
}