mirror of https://github.com/PCSX2/pcsx2.git
gsdx: throw an exception when we miss a mandatory gl feature
Gracefully quits when driver is not supported (like nvidia legacy driver for GTX260) Please test the impact on windows
This commit is contained in:
parent
3be5a6036b
commit
a3bbe68d56
|
@ -400,14 +400,23 @@ static int _GSopen(void** dsp, char* title, int renderer, int threads = -1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef _WINDOWS
|
||||||
|
try
|
||||||
|
{
|
||||||
|
s_gs->m_wnd->Attach(*dsp, false);
|
||||||
|
}
|
||||||
|
catch (GSDXRecoverableError)
|
||||||
|
{
|
||||||
|
s_gs->m_wnd->Detach();
|
||||||
|
delete s_gs->m_wnd;
|
||||||
|
s_gs->m_wnd = NULL;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if (s_gs->m_wnd == NULL)
|
if (s_gs->m_wnd == NULL)
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#ifdef _WINDOWS
|
|
||||||
s_gs->m_wnd->Attach(*dsp, false);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!s_gs->CreateDevice(dev))
|
if(!s_gs->CreateDevice(dev))
|
||||||
|
|
|
@ -275,6 +275,8 @@ void* GSWndWGL::GetProcAddress(const char* name, bool opt)
|
||||||
void* ptr = (void*)wglGetProcAddress(name);
|
void* ptr = (void*)wglGetProcAddress(name);
|
||||||
if (ptr == NULL) {
|
if (ptr == NULL) {
|
||||||
fprintf(stderr, "Failed to find %s\n", name);
|
fprintf(stderr, "Failed to find %s\n", name);
|
||||||
|
if (!opt)
|
||||||
|
throw GSDXRecoverableError();
|
||||||
}
|
}
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue