fix(settings): use --disable-gpu for hardware acceleration toggle to align with Tauri 2 ecosystem
This commit is contained in:
@@ -54,15 +54,10 @@ mod tauri_app {
|
|||||||
/// libraries like reqwest/rustls that read `HTTP_PROXY` etc.
|
/// libraries like reqwest/rustls that read `HTTP_PROXY` etc.
|
||||||
#[cfg(target_os = "windows")]
|
#[cfg(target_os = "windows")]
|
||||||
fn apply_webview2_rendering_override() {
|
fn apply_webview2_rendering_override() {
|
||||||
// Use `--disable-gpu-compositing` rather than `--disable-gpu`:
|
// Matches the dominant pattern across the Tauri 2 ecosystem (Dorion,
|
||||||
// - `--disable-gpu` forces SwiftShader software rendering, which fails
|
// Seelen-UI, and most production Tauri 2 apps that ship a "disable
|
||||||
// to initialize on a non-trivial subset of Windows + GPU driver
|
// hardware acceleration" toggle all use `--disable-gpu`).
|
||||||
// combinations and leaves the webview entirely blank.
|
const DISABLE_GPU_ARGS: [&str; 1] = ["--disable-gpu"];
|
||||||
// - `--disable-gpu-compositing` only disables the GPU compositor (the
|
|
||||||
// path that triggers the AMD/Intel black-screen bug) while keeping
|
|
||||||
// GPU rasterization. This is the same flag Electron's
|
|
||||||
// `app.disableHardwareAcceleration()` ultimately injects.
|
|
||||||
const DISABLE_GPU_ARGS: [&str; 1] = ["--disable-gpu-compositing"];
|
|
||||||
const ENV_KEY: &str = "WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS";
|
const ENV_KEY: &str = "WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS";
|
||||||
|
|
||||||
let prefs = crate::preferences::load();
|
let prefs = crate::preferences::load();
|
||||||
|
|||||||
Reference in New Issue
Block a user