aboutsummaryrefslogtreecommitdiff
path: root/backends/taskbar/win32
diff options
context:
space:
mode:
authorKirben2016-06-08 09:56:18 +1000
committerKirben2016-06-08 09:56:18 +1000
commit992585167041e77be219338629e49c11132a3d92 (patch)
tree226febd6660e62240385a8d71b0b7f33ce44c28c /backends/taskbar/win32
parent30b8030c1086e0e7ef8946c1f0891f01d7f30d3b (diff)
downloadscummvm-rg350-992585167041e77be219338629e49c11132a3d92.tar.gz
scummvm-rg350-992585167041e77be219338629e49c11132a3d92.tar.bz2
scummvm-rg350-992585167041e77be219338629e49c11132a3d92.zip
WIN32: Fix taskbar detection under Windows 10 onwards.
Diffstat (limited to 'backends/taskbar/win32')
-rw-r--r--backends/taskbar/win32/win32-taskbar.cpp8
1 files changed, 4 insertions, 4 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);