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
 {
675
 {
676
 	static bool menu = false;
676
 	static bool menu = false;
677
 
677
 
678
-
679
 	// Cheap menu test
678
 	// Cheap menu test
680
 	if (menu)
679
 	if (menu)
681
 	{
680
 	{
744
 			toggleFullscreen();
743
 			toggleFullscreen();
745
 		}
744
 		}
746
 		break;
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
 					break;
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
 #ifdef UNICODE_SUPPORT
496
 #ifdef UNICODE_SUPPORT
488
 				// JML: if a std key was pressed get it ascii code
497
 				// JML: if a std key was pressed get it ascii code
489
 				if (!specialKey && key != 0)
498
 				if (!specialKey && key != 0)

Loading…
Cancel
Save