mirror of
https://github.com/glfw/glfw.git
synced 2025-06-07 16:24:57 +00:00
Removing RemoteFX code and adjusting Readme.md
This commit is contained in:
parent
c302bb4e1a
commit
3cad917f6c
@ -229,6 +229,7 @@ information on what to include when reporting a bug.
|
|||||||
- [Win32] Bugfix: Instance-local operations used executable instance (#469,#1296,#1395)
|
- [Win32] Bugfix: Instance-local operations used executable instance (#469,#1296,#1395)
|
||||||
- [Win32] Bugfix: The OSMesa library was not unloaded on termination
|
- [Win32] Bugfix: The OSMesa library was not unloaded on termination
|
||||||
- [Win32] Bugfix: Right shift emitted `GLFW_KEY_UNKNOWN` when using a CJK IME (#2050)
|
- [Win32] Bugfix: Right shift emitted `GLFW_KEY_UNKNOWN` when using a CJK IME (#2050)
|
||||||
|
- [Win32] Bugfix: Disabled cursor mode doesn't work right when connected over RDP (#1276)
|
||||||
- [Cocoa] Added support for `VK_EXT_metal_surface` (#1619)
|
- [Cocoa] Added support for `VK_EXT_metal_surface` (#1619)
|
||||||
- [Cocoa] Added locating the Vulkan loader at runtime in an application bundle
|
- [Cocoa] Added locating the Vulkan loader at runtime in an application bundle
|
||||||
- [Cocoa] Moved main menu creation to GLFW initialization time (#1649)
|
- [Cocoa] Moved main menu creation to GLFW initialization time (#1649)
|
||||||
|
@ -460,61 +460,9 @@ static void createBlankCursor(void)
|
|||||||
|
|
||||||
|
|
||||||
// Check if the session was started in Remote Desktop
|
// Check if the session was started in Remote Desktop
|
||||||
// Reference: https://learn.microsoft.com/en-us/windows/win32/termserv/detecting-the-terminal-services-environment
|
|
||||||
static BOOL isCurrentRemoteSession()
|
static BOOL isCurrentRemoteSession()
|
||||||
{
|
{
|
||||||
BOOL fIsRemoteable = FALSE;
|
return GetSystemMetrics(SM_REMOTESESSION) > 0;
|
||||||
|
|
||||||
if (GetSystemMetrics(SM_REMOTESESSION))
|
|
||||||
{
|
|
||||||
fIsRemoteable = TRUE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
HKEY hRegKey = NULL;
|
|
||||||
LONG lResult;
|
|
||||||
|
|
||||||
lResult = RegOpenKeyEx(
|
|
||||||
HKEY_LOCAL_MACHINE,
|
|
||||||
TEXT("SYSTEM\\CurrentControlSet\\Control\\Terminal Server\\"),
|
|
||||||
0, // ulOptions
|
|
||||||
KEY_READ,
|
|
||||||
&hRegKey
|
|
||||||
);
|
|
||||||
|
|
||||||
if (lResult == ERROR_SUCCESS)
|
|
||||||
{
|
|
||||||
DWORD dwGlassSessionId;
|
|
||||||
DWORD cbGlassSessionId = sizeof(dwGlassSessionId);
|
|
||||||
DWORD dwType;
|
|
||||||
|
|
||||||
lResult = RegQueryValueEx(
|
|
||||||
hRegKey,
|
|
||||||
TEXT("GlassSessionId"),
|
|
||||||
NULL, // lpReserved
|
|
||||||
&dwType,
|
|
||||||
(BYTE*)&dwGlassSessionId,
|
|
||||||
&cbGlassSessionId
|
|
||||||
);
|
|
||||||
|
|
||||||
if (lResult == ERROR_SUCCESS)
|
|
||||||
{
|
|
||||||
DWORD dwCurrentSessionId;
|
|
||||||
|
|
||||||
if (ProcessIdToSessionId(GetCurrentProcessId(), &dwCurrentSessionId))
|
|
||||||
{
|
|
||||||
fIsRemoteable = (dwCurrentSessionId != dwGlassSessionId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (hRegKey)
|
|
||||||
{
|
|
||||||
RegCloseKey(hRegKey);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return fIsRemoteable;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user