diff options
| author | 2026-04-01 20:26:53 +0800 | |
|---|---|---|
| committer | 2026-04-01 20:26:53 +0800 | |
| commit | 403e98dd43246b5c54b5e19cde7c92b27fa0fb18 (patch) | |
| tree | 1a4e3f2897f686363e5118159ba2d92e1656da94 /src-tauri/src/main.rs | |
| parent | bf0634ab5091bb8c585b574c5ed175a2a231df5e (diff) | |
| parent | 2888c21bbb71b7c6524cb6bb6f673c849abefb66 (diff) | |
| download | DropOut-403e98dd43246b5c54b5e19cde7c92b27fa0fb18.tar.gz DropOut-403e98dd43246b5c54b5e19cde7c92b27fa0fb18.zip | |
Merge branch 'main' into feat/docs-build-test
Diffstat (limited to 'src-tauri/src/main.rs')
| -rw-r--r-- | src-tauri/src/main.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 63287cd..7f7c4c0 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -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()); |