Removed JVM args

This commit is contained in:
2026-04-04 22:34:39 +02:00
parent 67d8b9e365
commit 0fe65f51a7
4 changed files with 8 additions and 61 deletions
+6 -2
View File
@@ -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");
+1 -6
View File
@@ -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"),
}
}