Add a Steam Deck profile and keep the picture's proportions on screens of another shape.

The present fits the game's picture into the largest centred rectangle of its own aspect ratio and clears the rest to
black (gfx_fit_rect, through both the blit and FSR), so a 16:9 game on the Deck's 16:10 screen is no longer stretched;
picture_fit = stretch keeps the old fill. probe-window checks the bars as well as the picture.

device_profile = auto|desktop|deck: on a Steam Deck (the firmware's Valve Jupiter or Galileo board, or SteamDeck=1) the
keys totk.ini does not set default to fullscreen, a 1280x800 window, a 1280x720 game resolution, the game's own scene
scale, vsync and a 40 fps limit; the environment and totk.ini still win. These are starting points until measured on
the device (docs/tester-guide.md, Steam Deck).

Both stick clicks (L3 + R3) step the performance overlay as F10 does, for a controller with no keyboard. The menu offers
1280x720 and 1600x900 game resolutions and 40, 45 and 90 fps limits.
This commit is contained in:
Wellington Dias committed 2026-10-29 18:14:30 -03:00
1 parent 29a14d69fe
commit 2f78585b4c
15 files changed
+200 -35

No files matched your search

+12 -2
View File
@@ -329,8 +329,7 @@ void input_mouse_stick(int32_t dx, int32_t dy, double dt_s, float sens, int32_t
// down (the caller keeps it). Every poll of the latch reports neither to the game, so releasing one button first does not
// leak the other; Minus alone before Plus reaches the game unchanged. With the menu open the game sees a neutral pad.
// Returns 1 in the poll where both go down: the caller toggles the menu once.
int input_menu_gate(int *held, int menu_open, uint64_t *buttons, int32_t sticks[4]) {
const uint64_t combo = 1ull << B_MINUS | 1ull << B_PLUS;
static int chord(int *held, uint64_t *buttons, uint64_t combo) {
uint64_t raw = *buttons & combo;
int edge = 0;
if (*held) {
@@ -340,9 +339,20 @@ int input_menu_gate(int *held, int menu_open, uint64_t *buttons, int32_t sticks[
edge = 1;
}
if (*held) *buttons &= ~combo;
return edge;
}
int input_menu_gate(int *held, int menu_open, uint64_t *buttons, int32_t sticks[4]) {
int edge = chord(held, buttons, 1ull << B_MINUS | 1ull << B_PLUS);
if (menu_open) {
*buttons = 0;
sticks[0] = sticks[1] = sticks[2] = sticks[3] = 0;
}
return edge;
}
// Both stick clicks held together step the performance overlay as F10 does (a gamepad has no F10: the Steam Deck in
// Game Mode). The same latch as the menu's above; the game sees neither click while it holds.
int input_overlay_gate(int *held, uint64_t *buttons) {
return chord(held, buttons, 1ull << B_STICK_L | 1ull << B_STICK_R);
}