Add AArch64 crossbuild via Podman
All checks were successful
Build App / Build (push) Successful in 2m32s

Limit FPS
Config screen W/H
This commit is contained in:
2025-04-04 17:42:19 +02:00
parent 4e58d9a50e
commit b74831cdff
5 changed files with 42 additions and 15 deletions

View File

@@ -19,6 +19,8 @@ use serde::Deserialize;
#[derive(Deserialize,Clone)]
pub struct Config {
tournament: String,
w : u32,
h : u32,
update: Option<u32>,
fullscreen: Option<bool>,
smash_key: String,
@@ -40,7 +42,7 @@ struct Line<'a> {
impl Config {
fn new() -> Self {
Self { tournament: String::new(), update: Some(1),fullscreen:Some(false), smash_key: String::new(), font_size: 30 , font_size_departure : 45, margin: 10,tournament_image: None }
Self { tournament: String::new(), update: Some(1),fullscreen:Some(false), smash_key: String::new(), font_size: 30 , font_size_departure : 45, margin: 10,tournament_image: None , w : 1920, h: 1080}
}
}
@@ -159,7 +161,7 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
let sdl_context = sdl2::init().unwrap();
let video_subsystem = sdl_context.video().unwrap();
let mut build = video_subsystem.window("LaDOSE-SNCF", 1280, 720);
let mut build = video_subsystem.window("LaDOSE-SNCF", box_config.w, box_config.h);
if fullscreen {
build.fullscreen();
}
@@ -217,6 +219,6 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
}
canvas.present();
::std::thread::sleep(Duration::new(0, 1_000_000_000u32 / 60));
::std::thread::sleep(Duration::new(0, 1_000_000_000u32 / 30));
}
}