From 1b16618b13638e57bc9cf5c87135e0cce6054400 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 11 Dec 2017 11:47:52 -0800 Subject: [PATCH] Fixed Windows gcc build --- src/video/windows/SDL_windowsevents.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/video/windows/SDL_windowsevents.c b/src/video/windows/SDL_windowsevents.c index 40696b634..cb7493d79 100644 --- a/src/video/windows/SDL_windowsevents.c +++ b/src/video/windows/SDL_windowsevents.c @@ -1083,14 +1083,13 @@ struct SDL_WIN_OSVERSIONINFOW { static SDL_bool IsWin10FCUorNewer(void) { - typedef LONG(WINAPI* RtlGetVersionPtr)(struct SDL_WIN_OSVERSIONINFOW*); - struct SDL_WIN_OSVERSIONINFOW info; - SDL_zero(info); - HMODULE handle = GetModuleHandleW(L"ntdll.dll"); if (handle) { + typedef LONG(WINAPI* RtlGetVersionPtr)(struct SDL_WIN_OSVERSIONINFOW*); RtlGetVersionPtr getVersionPtr = (RtlGetVersionPtr)GetProcAddress(handle, "RtlGetVersion"); if (getVersionPtr != NULL) { + struct SDL_WIN_OSVERSIONINFOW info; + SDL_zero(info); info.dwOSVersionInfoSize = sizeof(info); if (getVersionPtr(&info) == 0) { /* STATUS_SUCCESS == 0 */ if ( (info.dwMajorVersion == 10 && info.dwMinorVersion == 0 && info.dwBuildNumber >= 16299)