mirror of https://github.com/PCSX2/pcsx2.git
GSdx: Quick sanity check before creating a SDL window.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4558 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
5d200881a4
commit
378a92b4c6
|
@ -345,6 +345,11 @@ bool GSWnd::Create(const string& title, int w, int h)
|
|||
h = theApp.GetConfig("ModeHeight", 480);
|
||||
}
|
||||
|
||||
#ifdef _LINUX
|
||||
// Sanity check; if there aren't any video displays available, we can't create a window.
|
||||
if (SDL_GetNumVideoDisplays() <= 0) return false;
|
||||
#endif
|
||||
|
||||
m_window = SDL_CreateWindow(title.c_str(), 100, 100, w, h, SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE);
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue