mirror of https://github.com/snes9xgit/snes9x.git
Simplify window recreation.
This commit is contained in:
parent
db6de9a624
commit
96a5e03770
|
@ -727,16 +727,10 @@ S9xOpenGLDisplayDriver::refresh (int width, int height)
|
||||||
void
|
void
|
||||||
S9xOpenGLDisplayDriver::resize_window (int width, int height)
|
S9xOpenGLDisplayDriver::resize_window (int width, int height)
|
||||||
{
|
{
|
||||||
XWindowChanges changes;
|
g_object_unref (gdk_window);
|
||||||
|
XDestroyWindow (display, xwindow);
|
||||||
changes.width = width;
|
create_window (width, height);
|
||||||
changes.height = height;
|
glXMakeCurrent (display, xwindow, glx_context);
|
||||||
XConfigureWindow (display, xwindow, CWWidth | CWHeight, &changes);
|
|
||||||
XSync (display, False);
|
|
||||||
|
|
||||||
gdk_window_show (gdk_window);
|
|
||||||
output_window_width = width;
|
|
||||||
output_window_height = height;
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,16 +39,9 @@ S9xXVDisplayDriver::S9xXVDisplayDriver (Snes9xWindow *window,
|
||||||
void
|
void
|
||||||
S9xXVDisplayDriver::resize_window (int width, int height)
|
S9xXVDisplayDriver::resize_window (int width, int height)
|
||||||
{
|
{
|
||||||
XWindowChanges changes;
|
g_object_unref (gdk_window);
|
||||||
|
XDestroyWindow (display, xwindow);
|
||||||
changes.width = width;
|
create_window (width, height);
|
||||||
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;
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue