mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-25 22:15:57 +00:00
The gamepad pauses while the window has no focus in a game Steam started, so Steam's overlay and menus get its presses alone (#1462)
Since #971, SDL passes gamepad events to the game while its window has no focus (SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS). On Linux the window is SDL's, and under Steam the focus goes to Steam's overlay and menus while they are open (the Quick Access menu in SteamOS's Game Mode): the game took the presses meant for them too, which 0.4.1 did not. The new setting pad_background (auto, 1, 0; read at start) decides the hint. auto, the default, keeps it on unless Steam started the game (SteamGameId or SteamOverlayGameId in the environment, set for Steam games and non-Steam shortcuts alike); 1 keeps the gamepad playing behind other windows under Steam too, 0 pauses it everywhere. input_map.c input_pad_background_pick holds the decision and cfg_probe checks it. On Windows the game window is not SDL's, and nothing changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6205940caf
commit
58fd4f6f68
7 files changed
+44
-5
No files matched your search
@@ -91,6 +91,12 @@ void input_map_configure(void);
|
||||
// pad's east button is labelled A (a Switch Pro Controller, a GuliKit) and Xbox otherwise.
|
||||
int input_pad_layout_pick(const char *setting, int east_labelled_a);
|
||||
|
||||
// Whether SDL passes gamepad presses and stick movements to the game while its window has no focus (TOTK_PAD_BACKGROUND,
|
||||
// input.c start): "1" on, "0" off. Anything else ("auto", NULL) is on unless Steam started the game: then the focus
|
||||
// goes to Steam's overlay and menus (the Quick Access menu in SteamOS's Game Mode), whose gamepad it is while they are
|
||||
// open (#1462); elsewhere the gamepad keeps playing while another window has the focus (#971).
|
||||
int input_pad_background_pick(const char *setting, int under_steam);
|
||||
|
||||
// Button prompts (TOTK_PROMPTS): the controller whose buttons the game's prompts show. Nintendo: the game's own. Xbox:
|
||||
// LB RB LT RT, Menu, View and a d-pad cross for the other buttons, and the face buttons named by the label of the
|
||||
// button the pad layout presses (runtime/romfs.c overlay_init, tools/make_romfs_patches.py --prompts). PlayStation: the
|
||||
|
||||
Reference in new issue
Block a user