Removed JVM args
This commit is contained in:
@@ -13,9 +13,9 @@ use lyceris::{
|
||||
},
|
||||
};
|
||||
use once_cell::sync::Lazy;
|
||||
use tauri::Emitter as _;
|
||||
use tauri::{Emitter as _, State};
|
||||
|
||||
use crate::GameVersion;
|
||||
use crate::{GameVersion, SharedState};
|
||||
|
||||
pub static LAUNCHER_DIR: Lazy<ProjectDirs> = Lazy::new(|| {
|
||||
ProjectDirs::from("org", "SaturnLauncher", "SaturnLauncher")
|
||||
@@ -25,6 +25,7 @@ pub static LAUNCHER_DIR: Lazy<ProjectDirs> = Lazy::new(|| {
|
||||
#[tauri::command]
|
||||
pub async fn launch_game(
|
||||
app: tauri::AppHandle,
|
||||
state: State<'_, SharedState>,
|
||||
version: GameVersion,
|
||||
account: MinecraftAccount,
|
||||
) -> Result<(), String> {
|
||||
@@ -83,6 +84,9 @@ pub async fn launch_game(
|
||||
},
|
||||
)
|
||||
.loader(Fabric(version.loader_version).into())
|
||||
.memory(lyceris::minecraft::config::Memory::Megabyte(
|
||||
state.lock().unwrap().settings.max_memory as u64,
|
||||
))
|
||||
.build();
|
||||
|
||||
println!("Starting installation");
|
||||
|
||||
@@ -30,7 +30,6 @@ pub struct GameVersion {
|
||||
|
||||
#[derive(Clone, Serialize, Deserialize)]
|
||||
pub struct LauncherSettings {
|
||||
pub jvm_arguments: String,
|
||||
pub max_memory: u32,
|
||||
}
|
||||
|
||||
@@ -44,11 +43,7 @@ pub struct AppState {
|
||||
impl Default for AppState {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
settings: LauncherSettings {
|
||||
jvm_arguments: "-XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200"
|
||||
.into(),
|
||||
max_memory: 4096,
|
||||
},
|
||||
settings: LauncherSettings { max_memory: 4096 },
|
||||
version: String::from("1.21.6"),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user