mirror of
https://github.com/djibux/BoilR.git
synced 2026-09-01 05:53:41 +02:00
Automatic fullscreen when starting from steam (#289)
This commit is contained in:
+9
-1
@@ -353,7 +353,7 @@ pub fn run_sync() {
|
||||
pub fn run_ui(args: Vec<String>) {
|
||||
let app = MyEguiApp::new();
|
||||
let no_v_sync = args.contains(&"--no-vsync".to_string());
|
||||
let fullscreen = args.contains(&"--fullscreen".to_string());
|
||||
let fullscreen = is_fullscreen(&args);
|
||||
let native_options = eframe::NativeOptions {
|
||||
fullscreen,
|
||||
maximized: true,
|
||||
@@ -371,3 +371,11 @@ pub fn run_ui(args: Vec<String>) {
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
fn is_fullscreen(args: &Vec<String>) -> bool {
|
||||
let is_steam_mode = match std::env::var("SteamAppId") {
|
||||
Ok(value) => !value.is_empty(),
|
||||
Err(_) => false,
|
||||
};
|
||||
is_steam_mode || args.contains(&"--fullscreen".to_string())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user