can’t innovate my ass Signed-off-by: FTCHD <144691102+FTCHD@users.noreply.github.com>
22 lines
765 B
Rust
22 lines
765 B
Rust
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
|
|
|
fn main() {
|
|
#[cfg(target_os = "linux")]
|
|
{
|
|
let is_dri_present = std::path::Path::new("/dev/dri").exists();
|
|
let is_wayland = std::env::var("WAYLAND_DISPLAY").is_ok();
|
|
let is_x11_session = std::env::var("XDG_SESSION_TYPE").unwrap_or_default() == "x11";
|
|
if is_dri_present && !is_wayland && is_x11_session {
|
|
if std::env::var_os("__NV_DISABLE_EXPLICIT_SYNC").is_none() {
|
|
std::env::set_var("__NV_DISABLE_EXPLICIT_SYNC", "1");
|
|
}
|
|
}
|
|
}
|
|
#[cfg(target_os = "windows")]
|
|
{
|
|
std::env::set_var("WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS", "--ignore-gpu-blocklist");
|
|
}
|
|
let _ = fix_path_env::fix();
|
|
app_lib::run();
|
|
}
|