Skip to content
Snippets Groups Projects
Commit 1d00e1ac authored by deuce's avatar deuce
Browse files

Ignore ALT-TAB keystrokes... weird things happen sometimes with them

enabled on Win32.
parent 27a5bb40
Branches
Tags
No related merge requests found
...@@ -1193,6 +1193,12 @@ int main(int argc, char **argv) ...@@ -1193,6 +1193,12 @@ int main(int argc, char **argv)
break; break;
case SDL_KEYDOWN: /* Keypress */ case SDL_KEYDOWN: /* Keypress */
if(ev.key.keysym.unicode > 0 && ev.key.keysym.unicode <= 0x7f) { /* ASCII Key (Whoopee!) */ if(ev.key.keysym.unicode > 0 && ev.key.keysym.unicode <= 0x7f) { /* ASCII Key (Whoopee!) */
/* ALT-TAB stuff doesn't work correctly inder Win32,
* seems ot pass a whole slew of TABs though here.
* Kludge-fix 'em by ignoring all ALT-TAB keystrokes
* that appear to be a tab */
if(ev.key.keysym.unicode=='\t' && ev.keykeysym.mode & KMOD_ALT)
break;
/* Need magical handling here... /* Need magical handling here...
* if ALT is pressed, run 'er through * if ALT is pressed, run 'er through
* sdl_get_char_code() ANYWAYS unless * sdl_get_char_code() ANYWAYS unless
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment