Browse Source

Now CMD+Q works everywhere

Thomas Buck 11 years ago
parent
commit
d93770b99a
2 changed files with 9 additions and 10 deletions
  1. 0
    10
      src/OpenRaider.cpp
  2. 9
    0
      src/SDLSystem.cpp

+ 0
- 10
src/OpenRaider.cpp View File

@@ -675,7 +675,6 @@ void OpenRaider::handleKeyPressEvent(unsigned int key, unsigned int mod)
675 675
 {
676 676
 	static bool menu = false;
677 677
 
678
-
679 678
 	// Cheap menu test
680 679
 	if (menu)
681 680
 	{
@@ -744,15 +743,6 @@ void OpenRaider::handleKeyPressEvent(unsigned int key, unsigned int mod)
744 743
 			toggleFullscreen();
745 744
 		}
746 745
 		break;
747
-
748
-#ifdef __APPLE__
749
-    // Handle CMD+Q to quit
750
-    case 'q':
751
-        if (mod & SYS_MOD_KEY_LMETA) {
752
-            shutdown(0);
753
-        }
754
-        break;
755
-#endif
756 746
 	}
757 747
 
758 748
 	////////////////////////////////////////////////////////////

+ 9
- 0
src/SDLSystem.cpp View File

@@ -484,6 +484,15 @@ void SDLSystem::runGame()
484 484
 					break;
485 485
 				}
486 486
 
487
+#ifdef __APPLE__
488
+                // Handle CMD+Q to quit in all circumstances
489
+                if (key == 'q') {
490
+                    if (mod & SYS_MOD_KEY_LMETA) {
491
+                        shutdown(0);
492
+                    }
493
+                }
494
+#endif
495
+
487 496
 #ifdef UNICODE_SUPPORT
488 497
 				// JML: if a std key was pressed get it ascii code
489 498
 				if (!specialKey && key != 0)

Loading…
Cancel
Save