diff options
Diffstat (limited to 'backends/taskbar')
-rw-r--r-- | backends/taskbar/win32/win32-taskbar.cpp | 8 | ||||
-rw-r--r-- | backends/taskbar/win32/win32-taskbar.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/backends/taskbar/win32/win32-taskbar.cpp b/backends/taskbar/win32/win32-taskbar.cpp index f3339fb917..b2810e55b4 100644 --- a/backends/taskbar/win32/win32-taskbar.cpp +++ b/backends/taskbar/win32/win32-taskbar.cpp @@ -85,7 +85,7 @@ const PROPERTYKEY PKEY_Title = { /* fmtid = */ { 0xF29F85E0, 0x4FF9, 0x1068, { 0 Win32TaskbarManager::Win32TaskbarManager(SdlWindow *window) : _window(window), _taskbar(NULL), _count(0), _icon(NULL) { // Do nothing if not running on Windows 7 or later - if (!isWin7OrLater()) + if (!confirmWindowsVersion(10, 0) && !confirmWindowsVersion(6, 1)) return; CoInitialize(NULL); @@ -400,14 +400,14 @@ BOOL VerifyVersionInfoFunc(LPOSVERSIONINFOEXA lpVersionInformation, DWORD dwType return verifyVersionInfo(lpVersionInformation, dwTypeMask, dwlConditionMask); } -bool Win32TaskbarManager::isWin7OrLater() { +bool Win32TaskbarManager::confirmWindowsVersion(uint majorVersion, uint minorVersion) { OSVERSIONINFOEX versionInfo; DWORDLONG conditionMask = 0; ZeroMemory(&versionInfo, sizeof(OSVERSIONINFOEX)); versionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); - versionInfo.dwMajorVersion = 6; - versionInfo.dwMinorVersion = 1; + versionInfo.dwMajorVersion = majorVersion; + versionInfo.dwMinorVersion = minorVersion; conditionMask = VerSetConditionMaskFunc(conditionMask, VER_MAJORVERSION, VER_GREATER_EQUAL); conditionMask = VerSetConditionMaskFunc(conditionMask, VER_MINORVERSION, VER_GREATER_EQUAL); diff --git a/backends/taskbar/win32/win32-taskbar.h b/backends/taskbar/win32/win32-taskbar.h index a6d1b49213..a5c024b21b 100644 --- a/backends/taskbar/win32/win32-taskbar.h +++ b/backends/taskbar/win32/win32-taskbar.h @@ -64,7 +64,7 @@ private: Common::String getIconPath(Common::String target); // Helper functions - bool isWin7OrLater(); + bool confirmWindowsVersion(uint majorVersion, uint minorVersion); LPWSTR ansiToUnicode(const char *s); HWND getHwnd(); }; |