mirror of
https://github.com/Corfirean/coa-server-manager.git
synced 2026-11-19 03:25:56 +00:00
19 lines
825 B
Rust
19 lines
825 B
Rust
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
|
|
|
fn main() {
|
|
// WebKitGTK's DMA-BUF renderer ends the process with a Wayland "Protocol error" on some graphics stacks (seen with
|
|
// an NVIDIA card on Wayland). The path without it works everywhere; a value set by the user is left alone.
|
|
#[cfg(target_os = "linux")]
|
|
if std::env::var_os("WEBKIT_DISABLE_DMABUF_RENDERER").is_none() {
|
|
std::env::set_var("WEBKIT_DISABLE_DMABUF_RENDERER", "1");
|
|
}
|
|
#[cfg(windows)]
|
|
if std::env::var_os("WEBVIEW2_USER_DATA_FOLDER").is_none() {
|
|
if let Some(dir) = std::env::var_os("COA_MANAGER_DATA_DIR") {
|
|
let wv = std::path::PathBuf::from(dir).join("webview");
|
|
std::env::set_var("WEBVIEW2_USER_DATA_FOLDER", wv);
|
|
}
|
|
}
|
|
coa_server_manager_lib::run()
|
|
}
|