Simplify window recreation.

This commit is contained in:
Brandon Wright 2014-02-05 02:44:04 -06:00
parent db6de9a624
commit 96a5e03770
2 changed files with 7 additions and 20 deletions

View File

@ -727,16 +727,10 @@ S9xOpenGLDisplayDriver::refresh (int width, int height)
void
S9xOpenGLDisplayDriver::resize_window (int width, int height)
{
XWindowChanges changes;
changes.width = width;
changes.height = height;
XConfigureWindow (display, xwindow, CWWidth | CWHeight, &changes);
XSync (display, False);
gdk_window_show (gdk_window);
output_window_width = width;
output_window_height = height;
g_object_unref (gdk_window);
XDestroyWindow (display, xwindow);
create_window (width, height);
glXMakeCurrent (display, xwindow, glx_context);
return;
}

View File

@ -39,16 +39,9 @@ S9xXVDisplayDriver::S9xXVDisplayDriver (Snes9xWindow *window,
void
S9xXVDisplayDriver::resize_window (int width, int height)
{
XWindowChanges changes;
changes.width = width;
changes.height = height;
XConfigureWindow (display, xwindow, CWWidth | CWHeight, &changes);
XSync (display, False);
gdk_window_show (gdk_window);
output_window_width = width;
output_window_height = height;
g_object_unref (gdk_window);
XDestroyWindow (display, xwindow);
create_window (width, height);
return;
}