X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fsystem.c;h=cd713c97e1962c95cfe82d357c8230462b4e8445;hp=ac3375454475790b1ca0e7553fa9feba4fb545e5;hb=74b5b6c19587f93c45b72b1153154030dc99b50d;hpb=9dcf51eadcd8fb8e1ba937b6a8db76096cc09b05 diff --git a/src/system.c b/src/system.c index ac337545..cd713c97 100644 --- a/src/system.c +++ b/src/system.c @@ -88,10 +88,6 @@ inline void FlushDisplay() { #ifndef USE_SDL_LIBRARY XFlush(display); -#else -#if 0 - SDL_UpdateRect(window, 0, 0, 0, 0); -#endif #endif } @@ -162,11 +158,24 @@ inline void NextEvent(Event *event) inline Key GetEventKey(KeyEvent *event, boolean with_modifiers) { #ifdef USE_SDL_LIBRARY + /* + printf("unicode == '%d', sym == '%d', mod == '0x%04x'\n", + (int)event->keysym.unicode, + (int)event->keysym.sym, + (int)SDL_GetModState()); + */ + if (with_modifiers && event->keysym.unicode != 0) return event->keysym.unicode; else return event->keysym.sym; #else + /* + printf("with modifiers == '0x%04x', without modifiers == '0x%04x'\n", + (int)XLookupKeysym(event, event->state), + (int)XLookupKeysym(event, 0)); + */ + if (with_modifiers) return XLookupKeysym(event, event->state); else