mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-19 03:01:02 +03:00
win7 uses soft rendering by default (#10139)
win7 vm got black screen on remote window with texture rendering Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
@@ -173,21 +173,36 @@ pub fn get_option<T: AsRef<str>>(key: T) -> String {
|
||||
}
|
||||
|
||||
#[inline]
|
||||
#[cfg(target_os = "macos")]
|
||||
pub fn use_texture_render() -> bool {
|
||||
cfg!(feature = "flutter") && LocalConfig::get_option(config::keys::OPTION_TEXTURE_RENDER) == "Y"
|
||||
}
|
||||
#[cfg(target_os = "android")]
|
||||
return false;
|
||||
#[cfg(target_os = "ios")]
|
||||
return false;
|
||||
|
||||
#[inline]
|
||||
#[cfg(any(target_os = "windows", target_os = "linux"))]
|
||||
pub fn use_texture_render() -> bool {
|
||||
cfg!(feature = "flutter") && LocalConfig::get_option(config::keys::OPTION_TEXTURE_RENDER) != "N"
|
||||
}
|
||||
#[cfg(target_os = "macos")]
|
||||
return cfg!(feature = "flutter")
|
||||
&& LocalConfig::get_option(config::keys::OPTION_TEXTURE_RENDER) == "Y";
|
||||
|
||||
#[inline]
|
||||
#[cfg(any(target_os = "android", target_os = "ios"))]
|
||||
pub fn use_texture_render() -> bool {
|
||||
false
|
||||
#[cfg(target_os = "linux")]
|
||||
return cfg!(feature = "flutter")
|
||||
&& LocalConfig::get_option(config::keys::OPTION_TEXTURE_RENDER) != "N";
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
{
|
||||
if !cfg!(feature = "flutter") {
|
||||
return false;
|
||||
}
|
||||
// https://learn.microsoft.com/en-us/windows/win32/sysinfo/targeting-your-application-at-windows-8-1
|
||||
#[cfg(debug_assertions)]
|
||||
let default_texture = true;
|
||||
#[cfg(not(debug_assertions))]
|
||||
let default_texture = crate::platform::is_win_10_or_greater();
|
||||
if default_texture {
|
||||
LocalConfig::get_option(config::keys::OPTION_TEXTURE_RENDER) != "N"
|
||||
} else {
|
||||
return LocalConfig::get_option(config::keys::OPTION_TEXTURE_RENDER) == "Y";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
||||
Reference in New Issue
Block a user