Skip to content

Commit

Permalink
Fixed Windows gcc build
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Dec 11, 2017
1 parent 7ac46a7 commit 1b16618
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/video/windows/SDL_windowsevents.c
Expand Up @@ -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)
Expand Down

0 comments on commit 1b16618

Please sign in to comment.