From 06afe633e6555d8adb91e0cdaa94e666e61db140 Mon Sep 17 00:00:00 2001 From: trustno1-coder <361337194+trustno1-coder@users.noreply.github.com> Date: Thu, 26 Nov 2026 21:53:38 -0800 Subject: [PATCH] Window and input from #17: asked for, off by default, in the F1 menu Fullscreen, the English keyboard and the mouse capture now run only when asked for (VICTORY_FULLSCREEN=1, VICTORY_MOUSE_CAPTURE=1, VICTORY_IME_ENGLISH=1), so a start that sets nothing keeps the window and input as before. The F1 menu has the three of them (FULLSCREEN (NO BORDER), MOUSE CAPTURE, ENGLISH KEYBOARD); a change applies at the next start. Checked: victory-hle, victory and the menu tests, with the three unset and with all three set to 1. Co-Authored-By: Claude Opus 5.5 --- crates/victory-gpu/src/host/menu.rs | 3 +++ crates/victory-hle/src/modules/lifecycle.rs | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/victory-gpu/src/host/menu.rs b/crates/victory-gpu/src/host/menu.rs index c394810..087cd13 100644 --- a/crates/victory-gpu/src/host/menu.rs +++ b/crates/victory-gpu/src/host/menu.rs @@ -63,6 +63,9 @@ const ITEMS: &[Item] = &[ Item { var: "VICTORY_MENU_FPS", label: "FRAME RATE CAP", values: &[("1000", "NONE"), ("120", "120"), ("60", "60"), ("30", "30 (THE GAME)")], live: false }, Item { var: "VICTORY_FPS_LINE", label: "FPS AT THE TOP", values: &[("1", "ON"), ("0", "OFF")], live: true }, Item { var: "VICTORY_PANEL", label: "STATS PANEL (F3)", values: &[("0", "OFF"), ("1", "ON")], live: true }, + Item { var: "VICTORY_FULLSCREEN", label: "FULLSCREEN (NO BORDER)", values: UNSET_ON, live: false }, + Item { var: "VICTORY_MOUSE_CAPTURE", label: "MOUSE CAPTURE", values: UNSET_ON, live: false }, + Item { var: "VICTORY_IME_ENGLISH", label: "ENGLISH KEYBOARD", values: UNSET_ON, live: false }, Item { var: "VICTORY_MENU_CONSOLE", label: "CONSOLE", values: &[("series-x", "SERIES X"), ("series-s", "SERIES S (FASTER)")], live: false }, Item { var: "VICTORY_MENU_RES", label: "SERIES X PICTURE", values: &[("1440", "2560X1440"), ("1080to1440", "1080P TO 1440P"), ("4k", "3840X2160")], live: false }, // The layer's switches. diff --git a/crates/victory-hle/src/modules/lifecycle.rs b/crates/victory-hle/src/modules/lifecycle.rs index cb2efe5..a8df2c4 100644 --- a/crates/victory-hle/src/modules/lifecycle.rs +++ b/crates/victory-hle/src/modules/lifecycle.rs @@ -97,8 +97,10 @@ pub extern "system" fn UnregisterAppConstrainedChangeNotification(registration: /// The window procedure a title window had before ours. const TITLE_PROC: PCWSTR = w!("victory.wndproc"); +/// Fullscreen, the English keyboard and the mouse capture are asked for +/// (`=1`, or the F1 menu): left unset, the window and input stay as before. pub(super) fn enabled(name: &str) -> bool { - std::env::var_os(name).is_none_or(|v| v != "0") + std::env::var_os(name).is_some_and(|v| v == "1") } fn fullscreen(hwnd: HWND) {