diff --git a/src/main.rs b/src/main.rs index 423b97df7..d420e6cf5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,5 +17,14 @@ mod ui; mod update_check; fn main() -> iced::Result { + // On some Windows hybrid-GPU laptops the AMD OpenGL driver (atio6axx.dll) + // access-violates the moment wgpu enumerates its GL backend at startup, + // killing the app before any window appears — even though DX12 would work + // fine (#55). Restrict wgpu to DX12/Vulkan so the GL ICD is never touched. + // An explicit user-set WGPU_BACKEND still wins. + #[cfg(target_os = "windows")] + if std::env::var_os("WGPU_BACKEND").is_none() { + std::env::set_var("WGPU_BACKEND", "dx12,vulkan"); + } app::run() }