Make the early OpenGL version check a bit more fuzzy.

This commit is contained in:
Henrik Rydgård 2013-10-15 14:59:41 +02:00
parent 5b9123b3c5
commit ecc8736d6b

View File

@ -13,7 +13,7 @@
static HDC hDC; // Private GDI Device Context
static HGLRC hRC; // Permanent Rendering Context
static HWND hWnd; // Holds Our Window Handle
static int xres, yres;
// TODO: Make config?
@ -133,7 +133,7 @@ bool GL_Init(HWND window, std::string *error_message) {
if (!(hRC = wglCreateContext(hDC))) {
*error_message = "Can't Create A GL Rendering Context.";
return false;
}
}
if (!wglMakeCurrent(hDC, hRC)) {
*error_message = "Can't activate the GL Rendering Context.";
@ -149,19 +149,19 @@ bool GL_Init(HWND window, std::string *error_message) {
// "1.4.0 - Build 8.14.10.2364" "intel" intel Pineview Platform
const char *glver = (const char *)glGetString(GL_VERSION);
if (!memcmp(glver, "1.4.0", 5) ||
!memcmp(glver, "1.3.0", 5) ||
!memcmp(glver, "1.2.0", 5) ||
!memcmp(glver, "1.1.0", 5) ||
!memcmp(glver, "1.0.0", 5)) {
if (!memcmp(glver, "1.5", 3) ||
!memcmp(glver, "1.4", 3) ||
!memcmp(glver, "1.3", 3) ||
!memcmp(glver, "1.2", 3) ||
!memcmp(glver, "1.1", 3) ||
!memcmp(glver, "1.0", 3)) {
// TODO:
const char *text = "Insufficient OpenGL driver support detected!\r\n\r\n"
"Your GPU reports that it does not support OpenGL 2.0, which is currently "
"required for PPSSPP to run.\r\n\r\n"
"required for PPSSPP to run.\r\n\r\n"
"Please check that your GPU is compatible with OpenGL 2.0. If it is, you need "
"to find and install new graphics drivers from your GPU vendor's website.\r\n\r\n";
"Visit the forums at http://forums.ppsspp.org for more information.";
"Visit the forums at http://forums.ppsspp.org for more information.";
const char *title = "OpenGL driver error";
MessageBox(0, ConvertUTF8ToWString(text).c_str(), ConvertUTF8ToWString(title).c_str(), MB_ICONWARNING);