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 <[email protected]>
This commit is contained in:
trustno1-coderandClaude Opus 5.5 committed 2026-11-26 21:53:38 -08:00
1 parent c8212dfe92
commit 06afe633e6
2 files changed
+6 -1

No files matched your search

+3
View File
@@ -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.
+3 -1
View File
@@ -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) {