refact register_breakdown_handler

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-02-19 10:19:28 +08:00
parent c44843c96a
commit b733ad9379
19 changed files with 101 additions and 108 deletions

View File

@@ -1,4 +1,4 @@
use hbb_common::log;
use hbb_common::{log, platform::register_breakdown_handler};
/// shared by flutter and sciter main function
///
@@ -38,10 +38,10 @@ pub fn core_main() -> Option<Vec<String>> {
}
i += 1;
}
register_breakdown_handler();
#[cfg(target_os = "linux")]
#[cfg(feature = "flutter")]
{
crate::platform::linux::register_breakdown_handler();
let (k, v) = ("LIBGL_ALWAYS_SOFTWARE", "true");
if !hbb_common::config::Config::get_option("allow-always-software-render").is_empty() {
std::env::set_var(k, v);