Skip to content

Commit a8603c6

Browse files
Add QSG_RHI for Windows to fix flickering[CPP-622] (#638)
* Revert "Add QSG_RHI env var to fix windows flickering. (#636)" This reverts commit 3eeea03. * Add QSG_RHI for Windows to fix flickering[CPP-622]
1 parent b0bc13d commit a8603c6

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

entrypoint/src/main.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,15 @@ fn main() -> Result<()> {
7070
std::env::set_var("SWIFTNAV_CONSOLE_FROZEN", app_dir()?);
7171
std::env::set_var("PYTHONHOME", pythonhome_dir()?);
7272
std::env::set_var("PYTHONDONTWRITEBYTECODE", "1");
73-
std::env::set_var("QSG_RHI", "1");
73+
74+
// This enables the Qt Rendering Hardware Interface (RHI), to reduce observed render
75+
// glitching on Windows. You can disable this feature by setting QSG_RHI=0 in your
76+
// environment variables.
77+
#[cfg(target_os = "windows")]
78+
if std::env::var("QSG_RHI").is_err() {
79+
std::env::set_var("QSG_RHI", "1");
80+
}
81+
7482
handle_splash();
7583
let exit_code = Python::with_gil(|py| {
7684
let args = PyTuple::new(py, args);

0 commit comments

Comments
 (0)