diff options
| author | aMannus <mannusmenting@gmail.com> | 2026-03-22 17:44:24 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-22 16:44:24 +0000 |
| commit | 1d9de8544a6fcfc063a0a2cebd455419b499be17 (patch) | |
| tree | 6b31c489fca4c7d23538dad915b05e41c6f009be | |
| parent | 25ee1ec3ab30c397bfae64c75ffe315ee9d9876d (diff) | |
Implement toggle for allowing background inputs (#6214)
| m--------- | libultraship | 0 | ||||
| -rw-r--r-- | soh/soh/SohGui/SohMenuSettings.cpp | 11 |
2 files changed, 11 insertions, 0 deletions
diff --git a/libultraship b/libultraship -Subproject 61bf1fbe9fceb032eba3c3cf61f93ca4065fa78 +Subproject 956f1082122f219d536c20483df89469f4b807d diff --git a/soh/soh/SohGui/SohMenuSettings.cpp b/soh/soh/SohGui/SohMenuSettings.cpp index 14add6cb0..b11dc01ce 100644 --- a/soh/soh/SohGui/SohMenuSettings.cpp +++ b/soh/soh/SohGui/SohMenuSettings.cpp @@ -145,6 +145,17 @@ void SohMenu::AddMenuSettings() { "Allows controller navigation of the port menu (Settings, Enhancements,...)\nCAUTION: " "This will disable game inputs while the menu is visible.\n\nD-pad to move between " "items, A to select, B to move up in scope.")); + AddWidget(path, "Allow background inputs", WIDGET_CVAR_CHECKBOX) + .CVar(CVAR_ALLOW_BACKGROUND_INPUTS) + .RaceDisable(false) + .Callback([](WidgetInfo& info) { + SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, + CVarGetInteger(CVAR_ALLOW_BACKGROUND_INPUTS, 1) ? "1" : "0"); + }) + .Options(CheckboxOptions() + .Tooltip("Allows controller inputs to be picked up by the game even when the game window isn't " + "the focused window.") + .DefaultValue(1)); AddWidget(path, "Menu Background Opacity", WIDGET_CVAR_SLIDER_FLOAT) .CVar(CVAR_SETTING("Menu.BackgroundOpacity")) .RaceDisable(false) |
