diff options
| author | Tim Schneeberger <tim.schneeberger@outlook.de> | 2026-06-10 23:42:07 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-06-10 23:42:07 +0200 |
| commit | 458613f2d94a969c9920dfc12ed57acfca7e5916 (patch) | |
| tree | fb30ae2208f1f1072f9cb44759c060d5105ee8f4 /src/port/ui/PortMenu.cpp | |
| parent | efdaf9d8fdc99f79527220617ba0004fb882aad3 (diff) | |
Fix Switch build (#705)
* Remove duplicate Switch::Init(PostInit) call.
It was called multiple times, causing multiple applet hooks (that all point to the same callback address) to be registered. For some reason, the OS started spamming us with FocusUpdate events via that hook because of that.
* Hide fullscreen and app data directory button on Switch
Diffstat (limited to 'src/port/ui/PortMenu.cpp')
| -rw-r--r-- | src/port/ui/PortMenu.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/port/ui/PortMenu.cpp b/src/port/ui/PortMenu.cpp index 15142be35..69e887481 100644 --- a/src/port/ui/PortMenu.cpp +++ b/src/port/ui/PortMenu.cpp @@ -97,11 +97,13 @@ void PortMenu::AddSettings() { WidgetPath path = { "Settings", "General", SECTION_COLUMN_1 }; static bool isFullscreen = false; +#ifndef __SWITCH__ AddWidget(path, "Toggle Fullscreen", WIDGET_CHECKBOX) .ValuePointer(&isFullscreen) .PreFunc([](WidgetInfo& info) { isFullscreen = Ship::Context::GetInstance()->GetWindow()->IsFullscreen(); }) .Callback([](WidgetInfo& info) { Ship::Context::GetInstance()->GetWindow()->ToggleFullscreen(); }) .Options(CheckboxOptions().Tooltip("Toggles Fullscreen On/Off.")); +#endif AddWidget(path, "Startup Behaviour", WIDGET_CVAR_COMBOBOX) .CVar("gSkipIntro") @@ -170,12 +172,14 @@ void PortMenu::AddSettings() { .CVar("gEnhancements.Mods.AlternateAssetsHotkey") .Options( CheckboxOptions().Tooltip("Allows pressing the Tab key to toggle alternate assets").DefaultValue(true)); +#ifndef __SWITCH__ AddWidget(path, "Open App Files Folder", WIDGET_BUTTON) .Callback([](WidgetInfo& info) { std::string filesPath = Ship::Context::GetInstance()->GetAppDirectoryPath(); SDL_OpenURL(std::string("file:///" + std::filesystem::absolute(filesPath).string()).c_str()); }) .Options(ButtonOptions().Tooltip("Opens the folder that contains the save and mods folders, etc.")); +#endif // Audio Settings path.sidebarName = "Audio"; |
