mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
In linux when in fullscreen, make escape leave fullscreen then pause.
More like on windows? git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5079 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
967c5891e9
commit
d5c094df75
@ -269,9 +269,11 @@ void ProcessXEvents(void)
|
||||
key = XLookupKeysym((XKeyEvent*)&event, 0);
|
||||
if(key == XK_F4 && ((event.xkey.state & Mod1Mask) == Mod1Mask))
|
||||
Host_Message(WM_USER_STOP);
|
||||
else if (key == XK_Escape)
|
||||
Host_Message(WM_USER_PAUSE);
|
||||
break;
|
||||
case KeyPress:
|
||||
key = XLookupKeysym((XKeyEvent*)&event, 0);
|
||||
if (key == XK_Escape)
|
||||
Host_Message(WM_USER_PAUSE);
|
||||
case ClientMessage:
|
||||
if ((ulong) event.xclient.data.l[0] == XInternAtom(dpy, "WM_DELETE_WINDOW", False))
|
||||
Host_Message(WM_USER_STOP);
|
||||
|
@ -571,7 +571,7 @@ void OpenGL_Update()
|
||||
switch(event.type) {
|
||||
case KeyRelease:
|
||||
key = XLookupKeysym((XKeyEvent*)&event, 0);
|
||||
if((key >= XK_F1 && key <= XK_F9) || key == XK_Escape) {
|
||||
if(key >= XK_F1 && key <= XK_F9) {
|
||||
g_VideoInitialize.pKeyPress(FKeyPressed, ShiftPressed, ControlPressed);
|
||||
FKeyPressed = -1;
|
||||
} else {
|
||||
@ -590,13 +590,20 @@ void OpenGL_Update()
|
||||
else
|
||||
FKeyPressed = key - 0xff4e;
|
||||
}
|
||||
else if (key == XK_Return && ((event.xkey.state & Mod1Mask) == Mod1Mask))
|
||||
ToggleFullscreenMode();
|
||||
else if (key == XK_Escape)
|
||||
{
|
||||
if (!GLWin.fs)
|
||||
FKeyPressed = 0x1c;
|
||||
if (GLWin.fs)
|
||||
{
|
||||
ToggleFullscreenMode();
|
||||
XEvent event;
|
||||
do {
|
||||
XMaskEvent(GLWin.dpy, StructureNotifyMask, &event);
|
||||
} while ( (event.type != MapNotify) || (event.xmap.event != GLWin.win) );
|
||||
}
|
||||
g_VideoInitialize.pKeyPress(0x1c, ShiftPressed, ControlPressed);
|
||||
}
|
||||
else if (key == XK_Return && ((event.xkey.state & Mod1Mask) == Mod1Mask))
|
||||
ToggleFullscreenMode();
|
||||
else {
|
||||
if(key == XK_Shift_L || key == XK_Shift_R)
|
||||
ShiftPressed = true;
|
||||
|
Loading…
Reference in New Issue
Block a user