Change MSW version checks to work for yet unreleased versions
wxGetWinVersion() will return wxWinVersion_Unknown for any MSW version not recognized by the version of wxWidgets used when building the application, so it makes sense to use a value higher than all currently known ones for this constant, so that the checks comparing the result of wxGetWinVersion() with any known version would still work correctly. E.g. comparisons like wxGetWinVersion() >= wxWinVersion_Vista will now continue to work for binaries built using the current wxWidgets even under some future Windows 11 OS version, unlike before.
This commit is contained in:
@@ -902,8 +902,6 @@ inline wxString wxGetFullModuleName()
|
||||
// for the other Windows versions 0 is currently returned
|
||||
enum wxWinVersion
|
||||
{
|
||||
wxWinVersion_Unknown = 0,
|
||||
|
||||
wxWinVersion_3 = 0x0300,
|
||||
wxWinVersion_NT3 = wxWinVersion_3,
|
||||
|
||||
@@ -930,7 +928,11 @@ enum wxWinVersion
|
||||
wxWinVersion_8 = 0x602,
|
||||
wxWinVersion_8_1 = 0x603,
|
||||
|
||||
wxWinVersion_10 = 0x1000
|
||||
wxWinVersion_10 = 0x1000,
|
||||
|
||||
// Any version we can't recognize will be later than the last currently
|
||||
// known one, so give it a value greater than any in the known range.
|
||||
wxWinVersion_Unknown = 0x7fff
|
||||
};
|
||||
|
||||
WXDLLIMPEXP_BASE wxWinVersion wxGetWinVersion();
|
||||
|
Reference in New Issue
Block a user