You've already forked AstralRinth
forked from didirus/AstralRinth
fullscreen (#360)
* fullscreen * improvements, and error catching * yarn prettier * discord rpc * fixed uninitialized options.txt * working discord version * incorrect boolean * change * merge issue; regex solution * fixed error * multi line mode * moved \n to start
This commit is contained in:
@@ -149,6 +149,8 @@ pub struct Profile {
|
||||
pub memory: Option<MemorySettings>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub resolution: Option<WindowSize>,
|
||||
#[serde(default)]
|
||||
pub force_fullscreen: SetFullscreen,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub hooks: Option<Hooks>,
|
||||
pub projects: HashMap<ProjectPathId, Project>,
|
||||
@@ -223,6 +225,21 @@ impl ModLoader {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone, Debug, Copy)]
|
||||
pub enum SetFullscreen {
|
||||
#[serde(rename = "Leave unset")]
|
||||
LeaveUnset,
|
||||
#[serde(rename = "Set windowed")]
|
||||
SetWindowed,
|
||||
#[serde(rename = "Set fullscreen")]
|
||||
SetFullscreen,
|
||||
}
|
||||
impl Default for SetFullscreen {
|
||||
fn default() -> Self {
|
||||
Self::LeaveUnset
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone, Debug)]
|
||||
pub struct JavaSettings {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
@@ -268,6 +285,7 @@ impl Profile {
|
||||
java: None,
|
||||
memory: None,
|
||||
resolution: None,
|
||||
force_fullscreen: SetFullscreen::LeaveUnset,
|
||||
hooks: None,
|
||||
modrinth_update_version: None,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user