You've already forked AstralRinth
forked from didirus/AstralRinth
New Alpha Final Fixes (#365)
This commit is contained in:
@@ -13,7 +13,7 @@ use tracing::error;
|
||||
use crate::event::emit::emit_process;
|
||||
use crate::event::ProcessPayloadType;
|
||||
use crate::util::io::IOError;
|
||||
use crate::EventState;
|
||||
|
||||
use tokio::task::JoinHandle;
|
||||
use uuid::Uuid;
|
||||
|
||||
@@ -155,7 +155,7 @@ impl Children {
|
||||
// If in tauri, window should show itself again after process exists if it was hidden
|
||||
#[cfg(feature = "tauri")]
|
||||
{
|
||||
let window = EventState::get_main_window().await?;
|
||||
let window = crate::EventState::get_main_window().await?;
|
||||
if let Some(window) = window {
|
||||
window.unminimize()?;
|
||||
}
|
||||
|
||||
@@ -149,8 +149,7 @@ pub struct Profile {
|
||||
pub memory: Option<MemorySettings>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub resolution: Option<WindowSize>,
|
||||
#[serde(default)]
|
||||
pub force_fullscreen: SetFullscreen,
|
||||
pub fullscreen: Option<bool>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub hooks: Option<Hooks>,
|
||||
pub projects: HashMap<ProjectPathId, Project>,
|
||||
@@ -225,21 +224,6 @@ 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")]
|
||||
@@ -285,7 +269,7 @@ impl Profile {
|
||||
java: None,
|
||||
memory: None,
|
||||
resolution: None,
|
||||
force_fullscreen: SetFullscreen::LeaveUnset,
|
||||
fullscreen: None,
|
||||
hooks: None,
|
||||
modrinth_update_version: None,
|
||||
})
|
||||
|
||||
@@ -18,6 +18,8 @@ const CURRENT_FORMAT_VERSION: u32 = 1;
|
||||
pub struct Settings {
|
||||
pub theme: Theme,
|
||||
pub memory: MemorySettings,
|
||||
#[serde(default)]
|
||||
pub force_fullscreen: bool,
|
||||
pub game_resolution: WindowSize,
|
||||
pub custom_java_args: Vec<String>,
|
||||
pub custom_env_args: Vec<(String, String)>,
|
||||
@@ -64,6 +66,7 @@ impl Settings {
|
||||
Ok(Self {
|
||||
theme: Theme::Dark,
|
||||
memory: MemorySettings::default(),
|
||||
force_fullscreen: false,
|
||||
game_resolution: WindowSize::default(),
|
||||
custom_java_args: Vec::new(),
|
||||
custom_env_args: Vec::new(),
|
||||
|
||||
Reference in New Issue
Block a user