mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-20 12:45:57 +00:00
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:
1 parent
29a14d69fe
commit
2f78585b4c
15 files changed
+200
-35
No files matched your search
+8
-3
@@ -412,7 +412,8 @@ static void row_window_size(void) {
|
||||
// The game resolution (resolution.c): 16:9 sizes from the game's own 1920x1080 up, and the current value when it is
|
||||
// another size.
|
||||
static void row_output_res(void) {
|
||||
static const char *const vals[] = {"1920x1080", "2560x1440", "3200x1800", "3840x2160"};
|
||||
// 1280x720: the Steam Deck's (letterboxed in its 1280x800 screen, TOTK_PICTURE_FIT)
|
||||
static const char *const vals[] = {"1280x720", "1600x900", "1920x1080", "2560x1440", "3200x1800", "3840x2160"};
|
||||
enum { N = sizeof vals / sizeof *vals };
|
||||
char shown[N][32];
|
||||
const char *names[N];
|
||||
@@ -476,8 +477,10 @@ static void row_game_lang(void) {
|
||||
|
||||
// The frame limit (frame_rate.c): unset, the older fps60 = 0 still means 30. The monitor choice shows the rate it gives.
|
||||
static void row_fps_limit() {
|
||||
static const char *const vals[] = {"30", "60", "120", "144", "display"};
|
||||
static const UiTextId ids[] = {UI_MENU_FPS_30, UI_MENU_FPS_60, UI_MENU_FPS_120, UI_MENU_FPS_144, UI_MENU_FPS_DISPLAY};
|
||||
// 40 and 45: the Steam Deck's screen runs at 40 to 60 Hz (the OLED to 90); 40 divides 40 and 120 Hz evenly
|
||||
static const char *const vals[] = {"30", "40", "45", "60", "90", "120", "144", "display"};
|
||||
static const UiTextId ids[] = {UI_MENU_FPS_30, UI_MENU_FPS_40, UI_MENU_FPS_45, UI_MENU_FPS_60,
|
||||
UI_MENU_FPS_90, UI_MENU_FPS_120, UI_MENU_FPS_144, UI_MENU_FPS_DISPLAY};
|
||||
enum { N = sizeof vals / sizeof *vals };
|
||||
const char *names[N];
|
||||
for (int i = 0; i < N; i++) names[i] = menu_text(ids[i]);
|
||||
@@ -527,6 +530,8 @@ static void tab_screen(float scale) {
|
||||
row_render_scale();
|
||||
static const UiTextId up[] = {UI_MENU_UPSCALER_FSR, UI_MENU_UPSCALER_BILINEAR};
|
||||
opt_choice("TOTK_UPSCALER", UI_MENU_UPSCALER, up, 2, UI_MENU_UPSCALER_DESC);
|
||||
static const UiTextId fit[] = {UI_MENU_PICTURE_FIT_KEEP, UI_MENU_PICTURE_FIT_STRETCH};
|
||||
opt_choice("TOTK_PICTURE_FIT", UI_MENU_PICTURE_FIT, fit, 2, UI_MENU_PICTURE_FIT_DESC);
|
||||
opt_slider("TOTK_SHARPNESS", UI_MENU_SHARPNESS, 0, 100, UI_MENU_SHARPNESS_DESC, 5, "%.0f %%");
|
||||
opt_end();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user