Skip to content
Browse files

workaround for allegro bug in tilde handling on Mac OS X

  • Loading branch information...
1 parent e7bec75 commit 1d361a0f4dd7a1d76ac6300f3710bfc422aa1c18 @dos1 committed May 1, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/main.c
View
6 src/main.c
@@ -407,8 +407,12 @@ int main(int argc, char **argv){
break;
}
else if (ev.type == ALLEGRO_EVENT_KEY_DOWN) {
- PrintConsole(&game, "KEYCODE: %s", al_keycode_to_name(ev.keyboard.keycode));
+ /*PrintConsole(&game, "KEYCODE: %s", al_keycode_to_name(ev.keyboard.keycode));*/
+ #ifdef ALLEGRO_MACOSX
+ if ((ev.type == ALLEGRO_EVENT_KEY_DOWN) && (ev.keyboard.keycode == 104)) {
+ #else
if ((ev.type == ALLEGRO_EVENT_KEY_DOWN) && (ev.keyboard.keycode == ALLEGRO_KEY_TILDE)) {
+ #endif
game.showconsole = !game.showconsole;
}
else if ((game.debug) && (ev.type == ALLEGRO_EVENT_KEY_DOWN) && (ev.keyboard.keycode == ALLEGRO_KEY_F1)) {

0 comments on commit 1d361a0

Please sign in to comment.
Something went wrong with that request. Please try again.