GLContext: Get size using eglQuerySurface()

Also no longer assumes that a nullptr display is not headless (needed for fbdev)
This commit is contained in:
Stenzek
2019-04-10 14:40:19 +00:00
parent 5ea4f998c0
commit 43fe02ee9b
12 changed files with 50 additions and 44 deletions

View File

@ -73,9 +73,9 @@ void GLContextGLX::Swap()
// Create rendering window.
// Call browser: Core.cpp:EmuThread() > main.cpp:Video_Initialize()
bool GLContextGLX::Initialize(void* display_handle, void* window_handle, bool stereo, bool core)
bool GLContextGLX::Initialize(const WindowSystemInfo& wsi, bool stereo, bool core)
{
m_display = static_cast<Display*>(display_handle);
m_display = static_cast<Display*>(wsi.display_connection);
int screen = DefaultScreen(m_display);
// checking glx version
@ -204,7 +204,7 @@ bool GLContextGLX::Initialize(void* display_handle, void* window_handle, bool st
}
}
if (!CreateWindowSurface(reinterpret_cast<Window>(window_handle)))
if (!CreateWindowSurface(reinterpret_cast<Window>(wsi.render_surface)))
{
ERROR_LOG(VIDEO, "Error: CreateWindowSurface failed\n");
XSetErrorHandler(oldHandler);