diff --git a/configuration.md b/configuration.md index d46dad80..b6b7f68c 100644 --- a/configuration.md +++ b/configuration.md @@ -53,3 +53,9 @@ enabled = true #If false, the whole download of custom art will be skipped. auth_key="" #This value is mandatory if you have steamgrid_db enabled. prefer_animated = false #If true, animated images will be prefered over static images when downloading art. ``` + + +## No Vsync +BoilR runs with Vsync Enabled, to limit its resource use. +This can be a problem for some setups that run Linux, Wayland and Nvidia (but not all). +If BoilR just crashes when you start it, try to add `--no-vsync` as an argument when you launch boilr. diff --git a/src/main.rs b/src/main.rs index 046a734a..f9281309 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,7 @@ mod amazon; mod config; mod egs; +mod flatpak; mod gog; mod heroic; mod itch; @@ -15,19 +16,18 @@ mod steamgriddb; mod sync; mod ui; mod uplay; -mod flatpak; use std::error::Error; fn main() -> Result<(), Box> { ensure_config_folder(); migration::migrate_config(); - let mut args = std::env::args(); - if args.len() > 1 && args.nth(1).unwrap_or_default() == "--no-ui" { + let args: Vec = std::env::args().collect(); + if args.contains(&"--no-ui".to_string()) { ui::run_sync(); Ok(()) } else { - ui::run_ui() + ui::run_ui(args) } } diff --git a/src/ui/uiapp.rs b/src/ui/uiapp.rs index 40d2ac8a..a24eb388 100644 --- a/src/ui/uiapp.rs +++ b/src/ui/uiapp.rs @@ -1,4 +1,4 @@ -use std::error::Error; +use std::{env::Args, error::Error}; use eframe::{egui, App, Frame}; use egui::{ImageButton, Rounding, Stroke, TextureHandle}; @@ -253,12 +253,13 @@ pub fn run_sync() { app.run_sync(); } -pub fn run_ui() -> Result<(), Box> { +pub fn run_ui(args: Vec) -> Result<(), Box> { let app = MyEguiApp::new(); - + let no_v_sync = args.contains(&"--no-vsync".to_string()); let native_options = eframe::NativeOptions { initial_window_size: Some(egui::Vec2 { x: 800., y: 500. }), icon_data: Some(get_logo_icon()), + vsync: !no_v_sync, ..Default::default() }; eframe::run_native(