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 -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) {