summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett Cox <garrettjcox@gmail.com>2026-08-21 14:08:16 -0500
committerGitHub <noreply@github.com>2026-08-21 14:08:16 -0500
commit10bfaa0f00151ee8f727fced69bb4853ff76f06e (patch)
tree2c4d1f50025ff23e27edbf5149737e4fcf2ddfc2
parent431dea3c6ea00d0447c68639cfe97628255ccdcd (diff)
Wire up background input toggle (#1898)
-rw-r--r--mm/2s2h/BenGui/BenMenu.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/mm/2s2h/BenGui/BenMenu.cpp b/mm/2s2h/BenGui/BenMenu.cpp
index 405f4bd9f..f9dfedcdf 100644
--- a/mm/2s2h/BenGui/BenMenu.cpp
+++ b/mm/2s2h/BenGui/BenMenu.cpp
@@ -379,6 +379,16 @@ void BenMenu::AddSettings() {
"Allows controller navigation of the 2Ship 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)
+ .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(true));
AddWidget(path, "Cursor Always Visible", WIDGET_CVAR_CHECKBOX)
.CVar("gSettings.CursorVisibility")
.Callback([](WidgetInfo& info) {