mirror of https://github.com/snes9xgit/snes9x.git
Bugfixes and typos
This commit is contained in:
parent
faad7990b6
commit
2f4ed1143a
14
unix/x11.cpp
14
unix/x11.cpp
|
@ -190,6 +190,7 @@
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
|
#include <X11/Xatom.h>
|
||||||
#include <X11/keysym.h>
|
#include <X11/keysym.h>
|
||||||
#include <X11/cursorfont.h>
|
#include <X11/cursorfont.h>
|
||||||
|
|
||||||
|
@ -591,14 +592,14 @@ void S9xInitDisplay (int argc, char **argv)
|
||||||
/* Create the window with maximum screen width,height positioned at 0,0. */
|
/* Create the window with maximum screen width,height positioned at 0,0. */
|
||||||
GUI.window = XCreateWindow(GUI.display, RootWindowOfScreen(GUI.screen),
|
GUI.window = XCreateWindow(GUI.display, RootWindowOfScreen(GUI.screen),
|
||||||
0, 0,
|
0, 0,
|
||||||
WidthOfScreen(GUI.screen), HeightOfScreen(GUI.screen), 0
|
WidthOfScreen(GUI.screen), HeightOfScreen(GUI.screen), 0,
|
||||||
GUI.depth, InputOutput, GUI.visual, CWBackPixel | CWColormap, &attrib);
|
GUI.depth, InputOutput, GUI.visual, CWBackPixel | CWColormap, &attrib);
|
||||||
|
|
||||||
/* Try to tell the Window Manager not to decorate this window. */
|
/* Try to tell the Window Manager not to decorate this window. */
|
||||||
Atom wm_state = XInternAtom (display, "_NET_WM_STATE", true );
|
Atom wm_state = XInternAtom (GUI.display, "_NET_WM_STATE", true );
|
||||||
Atom wm_fullscreen = XInternAtom (display, "_NET_WM_STATE_FULLSCREEN", true );
|
Atom wm_fullscreen = XInternAtom (GUI.display, "_NET_WM_STATE_FULLSCREEN", true );
|
||||||
|
|
||||||
XChangeProperty(display, window, wm_state, XA_ATOM, 32, PropModeReplace, (unsigned char *)&wm_fullscreen, 1);
|
XChangeProperty(GUI.display, GUI.window, wm_state, XA_ATOM, 32, PropModeReplace, (unsigned char *)&wm_fullscreen, 1);
|
||||||
|
|
||||||
/* Last: position the output window in the center of the screen. */
|
/* Last: position the output window in the center of the screen. */
|
||||||
GUI.x_offset = (WidthOfScreen(GUI.screen) - SNES_WIDTH * 2) / 2;
|
GUI.x_offset = (WidthOfScreen(GUI.screen) - SNES_WIDTH * 2) / 2;
|
||||||
|
@ -674,10 +675,13 @@ void S9xInitDisplay (int argc, char **argv)
|
||||||
|
|
||||||
void S9xDeinitDisplay (void)
|
void S9xDeinitDisplay (void)
|
||||||
{
|
{
|
||||||
S9xTextMode();
|
|
||||||
TakedownImage();
|
TakedownImage();
|
||||||
|
if (GUI.display != NULL)
|
||||||
|
{
|
||||||
|
S9xTextMode();
|
||||||
XSync(GUI.display, False);
|
XSync(GUI.display, False);
|
||||||
XCloseDisplay(GUI.display);
|
XCloseDisplay(GUI.display);
|
||||||
|
}
|
||||||
S9xBlitFilterDeinit();
|
S9xBlitFilterDeinit();
|
||||||
S9xBlit2xSaIFilterDeinit();
|
S9xBlit2xSaIFilterDeinit();
|
||||||
S9xBlitHQ2xFilterDeinit();
|
S9xBlitHQ2xFilterDeinit();
|
||||||
|
|
Loading…
Reference in New Issue