fix: custom client, options, option2bool() (#8302)

* fix: custom client, options, option2bool()

Signed-off-by: fufesou <linlong1266@gmail.com>

* format

Signed-off-by: fufesou <linlong1266@gmail.com>

---------

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou
2024-06-10 00:11:59 +08:00
committed by GitHub
parent 78d7bfac01
commit 32ab56f864
8 changed files with 45 additions and 7 deletions

View File

@@ -83,7 +83,10 @@ pub fn core_main() -> Option<Vec<String>> {
#[cfg(feature = "flutter")]
{
let (k, v) = ("LIBGL_ALWAYS_SOFTWARE", "1");
if !config::Config::get_option("allow-always-software-render").is_empty() {
if config::option2bool(
"allow-always-software-render",
&config::Config::get_option("allow-always-software-render"),
) {
std::env::set_var(k, v);
} else {
std::env::remove_var(k);