summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--]Xcode/SDL/SDL.xcodeproj/project.pbxproj0
-rw-r--r--src/core/windows/SDL_windows.c12
-rw-r--r--src/core/windows/SDL_windows.h3
3 files changed, 15 insertions, 0 deletions
diff --git a/Xcode/SDL/SDL.xcodeproj/project.pbxproj b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
index 2bc8fbfee..2bc8fbfee 100644..100755
--- a/Xcode/SDL/SDL.xcodeproj/project.pbxproj
+++ b/Xcode/SDL/SDL.xcodeproj/project.pbxproj
diff --git a/src/core/windows/SDL_windows.c b/src/core/windows/SDL_windows.c
index 3b2769884..22dadd267 100644
--- a/src/core/windows/SDL_windows.c
+++ b/src/core/windows/SDL_windows.c
@@ -33,6 +33,9 @@
#ifndef _WIN32_WINNT_WIN7
#define _WIN32_WINNT_WIN7 0x0601
#endif
+#ifndef _WIN32_WINNT_WIN8
+#define _WIN32_WINNT_WIN8 0x0602
+#endif
/* Sets an error message based on an HRESULT */
@@ -135,6 +138,15 @@ BOOL WIN_IsWindows7OrGreater(void)
#endif
}
+BOOL WIN_IsWindows8OrGreater(void)
+{
+#ifdef __WINRT__
+ return TRUE;
+#else
+ return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WIN8), LOBYTE(_WIN32_WINNT_WIN8), 0);
+#endif
+}
+
/*
WAVExxxCAPS gives you 31 bytes for the device name, and just truncates if it's
longer. However, since WinXP, you can use the WAVExxxCAPS2 structure, which
diff --git a/src/core/windows/SDL_windows.h b/src/core/windows/SDL_windows.h
index 08725e199..035538cd6 100644
--- a/src/core/windows/SDL_windows.h
+++ b/src/core/windows/SDL_windows.h
@@ -69,6 +69,9 @@ extern BOOL WIN_IsWindowsVistaOrGreater(void);
/* Returns SDL_TRUE if we're running on Windows 7 and newer */
extern BOOL WIN_IsWindows7OrGreater(void);
+/* Returns SDL_TRUE if we're running on Windows 8 and newer */
+extern BOOL WIN_IsWindows8OrGreater(void);
+
/* You need to SDL_free() the result of this call. */
extern char *WIN_LookupAudioDeviceName(const WCHAR *name, const GUID *guid);