mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-06-16 13:34:04 +08:00
ce4f0c02cb
- Set WEBKIT_DISABLE_DMABUF_RENDERER=1 at startup to fix blank screen on Debian 13.2 and Nvidia GPUs - Only register deep-link handler on first run to avoid overwriting user customizations - Use correct Tauri path API (app.path().data_dir()) instead of dirs::data_dir() to match plugin's actual .desktop file location
17 lines
641 B
Rust
17 lines
641 B
Rust
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
|
|
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
|
|
|
fn main() {
|
|
// 在 Linux 上设置 WebKit 环境变量以解决 DMA-BUF 渲染问题
|
|
// 某些 Linux 系统(如 Debian 13.2、Nvidia GPU)上 WebKitGTK 的 DMA-BUF 渲染器可能导致白屏/黑屏
|
|
// 参考: https://github.com/tauri-apps/tauri/issues/9394
|
|
#[cfg(target_os = "linux")]
|
|
{
|
|
if std::env::var("WEBKIT_DISABLE_DMABUF_RENDERER").is_err() {
|
|
std::env::set_var("WEBKIT_DISABLE_DMABUF_RENDERER", "1");
|
|
}
|
|
}
|
|
|
|
cc_switch_lib::run();
|
|
}
|