wxWidgets:windows: Fix debug build menu assertion

There was a version check in the menu handling, but Windows 8.1 and
Windows 10 weren't recognised and some pre Windows 98 code was used.

This is a combination of the following wxWidgets upstream commits.
9280f836c2569d0f50301a1117f7ba144e5240d2
1966dfb17d7cb106d1dfb44df6a15b92ba3b8d5f
c87c432033f4277bc9995a4de1390a59b810a005
a8c98a119145a77b1313337314853de75562e4ab

Thanks to micove for finding the commits.
This commit is contained in:
Jonathan Li 2015-09-27 23:33:44 +01:00
parent cbd2417833
commit 8e34af5b5e
2 changed files with 18 additions and 7 deletions

View File

@ -899,7 +899,9 @@ inline wxString wxGetFullModuleName()
// 0x0502 Windows XP SP2, 2003 SP1
// 0x0600 Windows Vista, 2008
// 0x0601 Windows 7
// 0x0602 Windows 8 (currently also returned for 8.1)
// 0x0602 Windows 8 (currently also returned for 8.1 if program does not have a manifest indicating 8.1 support)
// 0x0603 Windows 8.1 (currently only returned for 8.1 if program has a manifest indicating 8.1 support)
// 0x1000 Windows 10 (currently only returned for 10 if program has a manifest indicating 10 support)
//
// for the other Windows versions 0 is currently returned
enum wxWinVersion
@ -929,7 +931,10 @@ enum wxWinVersion
wxWinVersion_7 = 0x601,
wxWinVersion_8 = 0x602
wxWinVersion_8 = 0x602,
wxWinVersion_8_1 = 0x603,
wxWinVersion_10 = 0x1000
};
WXDLLIMPEXP_BASE wxWinVersion wxGetWinVersion();

View File

@ -1333,6 +1333,12 @@ wxString wxGetOsDescription()
break;
}
break;
case 10:
str = wxIsWindowsServer() == 1
? _("Windows Server 10")
: _("Windows 10");
break;
}
if ( str.empty() )
@ -1490,13 +1496,13 @@ wxWinVersion wxGetWinVersion()
return wxWinVersion_8;
case 3:
// For now, map to wxWinVersion_8. In case program
// does not have a manifest indicating 8.1
// support, Windows already performs this mapping
// for us.
return wxWinVersion_8;
return wxWinVersion_8_1;
}
break;
case 10:
return wxWinVersion_10;
}
default:
// Do nothing just to silence GCC warning