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:
21pages
2024-12-02 17:10:34 +08:00
committed by GitHub
parent dea99ffb3a
commit 773b9d6645
3 changed files with 38 additions and 12 deletions

View File

@@ -222,6 +222,11 @@ extern "C"
return IsWindowsServer();
}
bool is_windows_10_or_greater()
{
return IsWindows10OrGreater();
}
HANDLE LaunchProcessWin(LPCWSTR cmd, DWORD dwSessionId, BOOL as_user, DWORD *pDwTokenPid)
{
HANDLE hProcess = NULL;

View File

@@ -479,6 +479,7 @@ extern "C" {
fn selectInputDesktop() -> BOOL;
fn inputDesktopSelected() -> BOOL;
fn is_windows_server() -> BOOL;
fn is_windows_10_or_greater() -> BOOL;
fn handleMask(
out: *mut u8,
mask: *const u8,
@@ -1559,6 +1560,11 @@ pub fn is_win_server() -> bool {
unsafe { is_windows_server() > 0 }
}
#[inline]
pub fn is_win_10_or_greater() -> bool {
unsafe { is_windows_10_or_greater() > 0 }
}
pub fn bootstrap() {
if let Ok(lic) = get_license_from_exe_name() {
*config::EXE_RENDEZVOUS_SERVER.write().unwrap() = lic.host.clone();