[Scummvm-cvs-logs] CVS: scummvm x11.cpp,1.28,1.29
Lionel Ulmer
bbrox at users.sourceforge.net
Mon May 20 14:20:07 CEST 2002
Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv3956
Modified Files:
x11.cpp
Log Message:
Add modifier support to the X11 port.
Index: x11.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/x11.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- x11.cpp 18 May 2002 14:53:19 -0000 1.28
+++ x11.cpp 20 May 2002 21:19:53 -0000 1.29
@@ -819,6 +819,11 @@
*/
int keycode = -1;
int ascii = -1;
+ byte mode = 0;
+
+ if (event.xkey.state & 0x01) mode |= KBD_SHIFT;
+ if (event.xkey.state & 0x04) mode |= KBD_CTRL;
+ if (event.xkey.state & 0x08) mode |= KBD_ALT;
switch (event.xkey.keycode) {
case 9: /* Escape on my PC */
case 130: /* Calendar on the iPAQ */
@@ -857,7 +862,7 @@
scumm_event->event_code = EVENT_KEYDOWN;
scumm_event->kbd.keycode = keycode;
scumm_event->kbd.ascii = (ascii != -1 ? ascii : keycode);
- scumm_event->kbd.flags = 0;
+ scumm_event->kbd.flags = mode;
return true;
}
} break;
More information about the Scummvm-git-logs
mailing list