mirror of https://github.com/PCSX2/pcsx2.git
gsdx: only print once OpenGL status message
All credits go to @lightningterror Fix #1882
This commit is contained in:
parent
0939424574
commit
ec63b04719
|
@ -264,6 +264,8 @@ namespace Emulate_DSA {
|
|||
|
||||
namespace GLLoader {
|
||||
|
||||
bool s_first_load = true;
|
||||
|
||||
bool legacy_fglrx_buggy_driver = false;
|
||||
bool fglrx_buggy_driver = false;
|
||||
bool mesa_buggy_driver = false;
|
||||
|
@ -304,10 +306,12 @@ namespace GLLoader {
|
|||
return found;
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
fprintf(stdout, "INFO: %s is NOT SUPPORTED\n", name.c_str());
|
||||
} else {
|
||||
fprintf(stdout, "INFO: %s is available\n", name.c_str());
|
||||
if (s_first_load) {
|
||||
if (!found) {
|
||||
fprintf(stdout, "INFO: %s is NOT SUPPORTED\n", name.c_str());
|
||||
} else {
|
||||
fprintf(stdout, "INFO: %s is available\n", name.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
std::string opt("override_");
|
||||
|
@ -332,7 +336,8 @@ namespace GLLoader {
|
|||
while (s[v] != '\0' && s[v-1] != ' ') v++;
|
||||
|
||||
const char* vendor = (const char*)glGetString(GL_VENDOR);
|
||||
fprintf(stdout, "OpenGL information. GPU: %s. Vendor: %s. Driver: %s\n", glGetString(GL_RENDERER), vendor, &s[v]);
|
||||
if (s_first_load)
|
||||
fprintf(stdout, "OpenGL information. GPU: %s. Vendor: %s. Driver: %s\n", glGetString(GL_RENDERER), vendor, &s[v]);
|
||||
|
||||
// Name changed but driver is still bad!
|
||||
if (strstr(vendor, "Advanced Micro Devices") || strstr(vendor, "ATI Technologies Inc.") || strstr(vendor, "ATI"))
|
||||
|
@ -461,8 +466,20 @@ namespace GLLoader {
|
|||
}
|
||||
#endif
|
||||
|
||||
fprintf(stdout, "\n");
|
||||
if (s_first_load)
|
||||
fprintf(stdout, "\n");
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
void check_gl_requirements()
|
||||
{
|
||||
if (!GLLoader::check_gl_version(3, 3))
|
||||
throw GSDXRecoverableError();
|
||||
|
||||
if (!GLLoader::check_gl_supported_extension())
|
||||
throw GSDXRecoverableError();
|
||||
|
||||
s_first_load = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -356,9 +356,7 @@ extern PFNGLGENERATEMIPMAPPROC glGenerateMipmap;
|
|||
|
||||
|
||||
namespace GLLoader {
|
||||
bool check_gl_version(int major, int minor);
|
||||
void init_gl_function();
|
||||
bool check_gl_supported_extension();
|
||||
void check_gl_requirements();
|
||||
|
||||
extern bool fglrx_buggy_driver;
|
||||
extern bool legacy_fglrx_buggy_driver;
|
||||
|
|
|
@ -181,9 +181,5 @@ void GSWndGL::PopulateGlFunction()
|
|||
|
||||
// Check openGL requirement as soon as possible so we can switch to another
|
||||
// renderer/device
|
||||
if (!GLLoader::check_gl_version(3, 3))
|
||||
throw GSDXRecoverableError();
|
||||
|
||||
if (!GLLoader::check_gl_supported_extension())
|
||||
throw GSDXRecoverableError();
|
||||
GLLoader::check_gl_requirements();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue