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:
Generated
+1
-1
@@ -265,7 +265,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "boilr"
|
||||
version = "1.7.10"
|
||||
version = "1.7.11"
|
||||
dependencies = [
|
||||
"base64 0.20.0",
|
||||
"chrono",
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
[package]
|
||||
edition = "2021"
|
||||
name = "boilr"
|
||||
version = "1.7.10"
|
||||
version = "1.7.11"
|
||||
|
||||
[dependencies]
|
||||
base64 = "^0.20.0"
|
||||
|
||||
@@ -25,6 +25,13 @@ https://hughsie.github.io/oars/index.html
|
||||
-->
|
||||
<content_rating type="oars-1.1" />
|
||||
<releases>
|
||||
<release version="1.7.11" date="2022-12-28">
|
||||
<description>
|
||||
<ul>
|
||||
<li>Automatically go fullscreen when in steam mode</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<release version="1.7.10" date="2022-12-28">
|
||||
<description>
|
||||
<ul>
|
||||
|
||||
+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