fix: restore wine configuration

This commit is contained in:
2025-03-14 15:16:49 +01:00
parent e1ff28d4e0
commit 62edcdae08
13 changed files with 97 additions and 72 deletions

View File

@ -11,6 +11,19 @@ pub struct Segatools {
pub intel: bool,
}
impl Default for Segatools {
fn default() -> Self {
Segatools {
target: PathBuf::default(),
amfs: PathBuf::default(),
option: PathBuf::default(),
appdata: PathBuf::from("appdata"),
enable_aime: false,
intel: false
}
}
}
#[derive(Deserialize, Serialize, Clone, Default, PartialEq)]
pub enum DisplayMode {
Window,
@ -28,6 +41,19 @@ pub struct Display {
pub borderless_fullscreen: bool,
}
impl Default for Display {
fn default() -> Self {
Display {
target: "default".to_owned(),
rez: (1080, 1920),
mode: DisplayMode::Borderless,
rotation: 0,
frequency: 60,
borderless_fullscreen: true,
}
}
}
#[derive(Deserialize, Serialize, Clone, Default, PartialEq)]
pub enum NetworkType {
#[default] Remote,
@ -38,7 +64,7 @@ pub enum NetworkType {
pub struct Network {
pub network_type: NetworkType,
pub local_path: String,
pub local_path: PathBuf,
pub local_console: bool,
pub remote_address: String,
@ -50,5 +76,22 @@ pub struct Network {
#[derive(Deserialize, Serialize, Clone, Default)]
pub struct BepInEx {
pub console: bool
pub console: bool,
}
#[derive(Deserialize, Serialize, Clone)]
pub struct Wine {
pub runtime: PathBuf,
pub prefix: PathBuf,
}
impl Default for Wine {
fn default() -> Self {
Wine {
runtime: PathBuf::from("/usr/bin/wine"),
prefix: std::env::var("HOME")
.and_then(|home| Ok(PathBuf::from(home).join(".wine")))
.unwrap_or_default()
}
}
}