|
|
@ -558,14 +558,6 @@ BOOL _glfwIsWindows10BuildOrGreaterWin32(WORD build) |
|
|
|
|
|
|
|
|
|
|
|
int _glfwPlatformInit(void) |
|
|
|
int _glfwPlatformInit(void) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// To make SetForegroundWindow work as we want, we need to fiddle
|
|
|
|
|
|
|
|
// with the FOREGROUNDLOCKTIMEOUT system setting (we do this as early
|
|
|
|
|
|
|
|
// as possible in the hope of still being the foreground process)
|
|
|
|
|
|
|
|
SystemParametersInfoW(SPI_GETFOREGROUNDLOCKTIMEOUT, 0, |
|
|
|
|
|
|
|
&_glfw.win32.foregroundLockTimeout, 0); |
|
|
|
|
|
|
|
SystemParametersInfoW(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, UIntToPtr(0), |
|
|
|
|
|
|
|
SPIF_SENDCHANGE); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!loadLibraries()) |
|
|
|
if (!loadLibraries()) |
|
|
|
return GLFW_FALSE; |
|
|
|
return GLFW_FALSE; |
|
|
|
|
|
|
|
|
|
|
@ -601,11 +593,6 @@ void _glfwPlatformTerminate(void) |
|
|
|
|
|
|
|
|
|
|
|
_glfwUnregisterWindowClassWin32(); |
|
|
|
_glfwUnregisterWindowClassWin32(); |
|
|
|
|
|
|
|
|
|
|
|
// Restore previous foreground lock timeout system setting
|
|
|
|
|
|
|
|
SystemParametersInfoW(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, |
|
|
|
|
|
|
|
UIntToPtr(_glfw.win32.foregroundLockTimeout), |
|
|
|
|
|
|
|
SPIF_SENDCHANGE); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
free(_glfw.win32.clipboardString); |
|
|
|
free(_glfw.win32.clipboardString); |
|
|
|
free(_glfw.win32.rawInput); |
|
|
|
free(_glfw.win32.rawInput); |
|
|
|
|
|
|
|
|
|
|
|