aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src-tauri/src/main.rs
diff options
context:
space:
mode:
authorkrypton <bot@hydroroll.team>2026-04-01 14:12:30 +0800
committerkrypton <bot@hydroroll.team>2026-04-01 14:12:30 +0800
commit0e2f2ed0b71d58a1e04f95ab19ae1893f99bd884 (patch)
treef89b1c23edbcdac7cc61fefa3935f412b5a9c8e1 /src-tauri/src/main.rs
parent64228251e7523e9cdc98d0c13db948b679722ff4 (diff)
downloadDropOut-0e2f2ed0b71d58a1e04f95ab19ae1893f99bd884.tar.gz
DropOut-0e2f2ed0b71d58a1e04f95ab19ae1893f99bd884.zip
feat: default GPU acceleration without conditional check
Diffstat (limited to 'src-tauri/src/main.rs')
-rw-r--r--src-tauri/src/main.rs22
1 files changed, 10 insertions, 12 deletions
diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs
index f15a2c6..5ae1c8d 100644
--- a/src-tauri/src/main.rs
+++ b/src-tauri/src/main.rs
@@ -660,20 +660,18 @@ async fn start_game(
args.push(format!("-Djava.library.path={}", natives_path));
}
- // Add GPU acceleration parameters if enabled
+ // Add GPU acceleration parameters by default
// JavaFX Prism rendering pipeline settings for hardware acceleration
- if config.enable_gpu_acceleration {
- // 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());
- }
- // Force GPU usage instead of software fallback
- args.push("-Dprism.forcegpu=true".to_string());
+ // 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());
}
+ // Force GPU usage instead of software fallback
+ args.push("-Dprism.forcegpu=true".to_string());
// Ensure classpath is set if not already
if !args.iter().any(|a| a == "-cp" || a == "-classpath") {