Hide DX11 on WinXP (fixes Issue 3719)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7379 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
j4ck.fr0st 2011-03-19 12:58:55 +00:00
parent 3db702fe17
commit 205637ccc3

View File

@ -28,12 +28,29 @@
std::vector<VideoBackend*> g_available_video_backends; std::vector<VideoBackend*> g_available_video_backends;
VideoBackend* g_video_backend = NULL; VideoBackend* g_video_backend = NULL;
#ifdef _WIN32
// http://msdn.microsoft.com/en-us/library/ms725491.aspx
static bool IsGteVista()
{
OSVERSIONINFOEX osvi;
DWORDLONG dwlConditionMask = 0;
ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
osvi.dwMajorVersion = 6;
VER_SET_CONDITION(dwlConditionMask, VER_MAJORVERSION, VER_GREATER_EQUAL);
return VerifyVersionInfo(&osvi, VER_MAJORVERSION, dwlConditionMask);
}
#endif
void VideoBackend::PopulateList() void VideoBackend::PopulateList()
{ {
#ifdef _WIN32 #ifdef _WIN32
g_available_video_backends.push_back(new DX9::VideoBackend); g_available_video_backends.push_back(new DX9::VideoBackend);
// TODO: if (winver >= VISTA) :p if (IsGteVista())
g_available_video_backends.push_back(new DX11::VideoBackend); g_available_video_backends.push_back(new DX11::VideoBackend);
#endif #endif
g_available_video_backends.push_back(new OGL::VideoBackend); g_available_video_backends.push_back(new OGL::VideoBackend);
g_available_video_backends.push_back(new SW::VideoSoftware); g_available_video_backends.push_back(new SW::VideoSoftware);