diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index c7592bb..abe9caf 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -99,7 +99,7 @@ pub fn run() { .setup(|app| { let app_handle = app.handle().clone(); let config = config::load_config_raw(app_handle.clone()); - if config.start_fullscreen.unwrap_or(true) { + if config.start_fullscreen.unwrap_or(false) { if let Some(window) = app_handle.get_webview_window("main") { let _ = window.set_fullscreen(true); } diff --git a/src/context/LauncherContext.tsx b/src/context/LauncherContext.tsx index de19b9b..27c6d85 100644 --- a/src/context/LauncherContext.tsx +++ b/src/context/LauncherContext.tsx @@ -65,7 +65,7 @@ export function LauncherProvider({ children }: { children: React.ReactNode }) { configRaw.rpcEnabled, configRaw.musicVol, configRaw.sfxVol, configRaw.isDayTime, configRaw.profile, configRaw.linuxRunner, configRaw.perfBoost, configRaw.customEditions, configRaw.legacyMode, configRaw.animationsEnabled, configRaw.mangohudEnabled, - configRaw.extraLaunchArgs, configRaw.launchPrefix, configRaw.launchEnvVars + configRaw.extraLaunchArgs, configRaw.launchPrefix, configRaw.launchEnvVars, configRaw.startFullscreen ]); const game = useMemo(() => gameRaw, [ @@ -134,6 +134,7 @@ export function LauncherProvider({ children }: { children: React.ReactNode }) { extraLaunchArgs: config.extraLaunchArgs, launchPrefix: config.launchPrefix, launchEnvVars: config.launchEnvVars, + startFullscreen: config.startFullscreen }).catch(console.error); } }, [ @@ -142,26 +143,22 @@ export function LauncherProvider({ children }: { children: React.ReactNode }) { config.vfxEnabled, config.animationsEnabled, config.rpcEnabled, config.musicVol, config.sfxVol, config.legacyMode, config.mangohudEnabled, config.extraLaunchArgs, config.launchPrefix, - config.launchEnvVars, config.isLoaded + config.launchEnvVars, config.isLoaded, config.startFullscreen ]); useEffect(() => { const setupVisibilityDetection = async () => { try { const { listen } = await import("@tauri-apps/api/event"); - const unlistenClose = await listen("tauri://close-requested", () => { - console.log("Window close requested - hiding music"); setIsWindowVisible(false); }); const unlistenShow = await listen("tauri://window-shown", () => { - console.log("Window shown - resuming music"); setIsWindowVisible(true); }); const unlistenFocus = await listen("tauri://focus", () => { - console.log("Window focused - resuming music"); setIsWindowVisible(true); });