All checks were successful
Build Tauri App (Linux + Windows exe) / build (push) Successful in 11m9s
21 lines
672 B
Rust
21 lines
672 B
Rust
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
|
|
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
|
|
|
// if there are nvidia drivers and were on wayland disable dma buffer.
|
|
// on a x11 system this wont fire
|
|
fn disable_dmabuf_if_true() {
|
|
if std::env::var("XDG_SESSION_TYPE").unwrap_or_default() == "wayland" {
|
|
if let Ok(vendor) = std::fs::read_to_string("/proc/driver/nvidia/version") {
|
|
if vendor.contains("NVIDIA") {
|
|
std::env::set_var("WEBKIT_DISABLE_DMABUF_RENDERER", "1");
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
fn main() {
|
|
disable_dmabuf_if_true();
|
|
bytechat_desktop_lib::run()
|
|
}
|