From: <man...@us...> - 2014-01-02 12:51:25
|
Revision: 3546 http://sourceforge.net/p/modplug/code/3546 Author: manxorist Date: 2014-01-02 12:51:18 +0000 (Thu, 02 Jan 2014) Log Message: ----------- [Fix] VS2008 with older SDKs has no _WINNT_WIN32_* macros for newer windows versions. Provide matching enum values. Modified Paths: -------------- trunk/OpenMPT/common/misc_util.h trunk/OpenMPT/sounddev/SoundDevice.cpp Modified: trunk/OpenMPT/common/misc_util.h =================================================================== --- trunk/OpenMPT/common/misc_util.h 2014-01-02 12:32:34 UTC (rev 3545) +++ trunk/OpenMPT/common/misc_util.h 2014-01-02 12:51:18 UTC (rev 3546) @@ -658,7 +658,18 @@ namespace Windows { -// returns version in the form of the _WIN32_WINNT_* macros +enum WinNTVersion +{ + VerWin2000 = 0x0500, + VerWinXP = 0x0501, + VerWinXPSP2 = 0x0502, + VerWinVista = 0x0600, + VerWinVista = 0x0600, + VerWin7 = 0x0601, + VerWin8 = 0x0602, +}; + +// returns version in the form of the _WIN32_WINNT_* macros or mpt::Windows::WinNTVersion static inline uint32 GetWinNTVersion() //------------------------------------ { Modified: trunk/OpenMPT/sounddev/SoundDevice.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDevice.cpp 2014-01-02 12:32:34 UTC (rev 3545) +++ trunk/OpenMPT/sounddev/SoundDevice.cpp 2014-01-02 12:51:18 UTC (rev 3546) @@ -388,7 +388,7 @@ //------------------------------------------------------------------------------------------ { - m_HasXP = (mpt::Windows::GetWinNTVersion() >= _WIN32_WINNT_WINXP); + m_HasXP = (mpt::Windows::GetWinNTVersion() >= mpt::Windows::VerWinXP); m_hKernel32DLL = NULL; @@ -479,7 +479,7 @@ , hTask(NULL) { - m_HasVista = (mpt::Windows::GetWinNTVersion() >= _WIN32_WINNT_VISTA); + m_HasVista = (mpt::Windows::GetWinNTVersion() >= mpt::Windows::VerWinVista); if(m_HasVista) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |