mirror of
https://github.com/djibux/BoilR.git
synced 2026-09-01 05:53:41 +02:00
+4
-4
@@ -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<dyn Error>> {
|
||||
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<String> = std::env::args().collect();
|
||||
if args.contains(&"--no-ui".to_string()) {
|
||||
ui::run_sync();
|
||||
Ok(())
|
||||
} else {
|
||||
ui::run_ui()
|
||||
ui::run_ui(args)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-3
@@ -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<dyn Error>> {
|
||||
pub fn run_ui(args: Vec<String>) -> Result<(), Box<dyn Error>> {
|
||||
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(
|
||||
|
||||
Reference in New Issue
Block a user