Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,20 @@ async fn start_game(
args.push(format!("-Djava.library.path={}", natives_path));
}

// Add GPU acceleration parameters if not already set by user
// JavaFX Prism rendering pipeline settings for hardware acceleration
// Only set prism.order if user hasn't already specified it
if !args.iter().any(|a| a.contains("-Dprism.order=")) {
// Platform-specific rendering order:
// - Windows: d3d (Direct3D) > es2 (OpenGL ES 2) > sw (software)
// - Linux/macOS: es2 > sw (no Direct3D available)
if cfg!(target_os = "windows") {
args.push("-Dprism.order=d3d,es2,sw".to_string());
} else {
args.push("-Dprism.order=es2,sw".to_string());
}
}

// Ensure classpath is set if not already
if !args.iter().any(|a| a == "-cp" || a == "-classpath") {
args.push("-cp".to_string());
Expand Down
Loading