summaryrefslogtreecommitdiff
path: root/src/main_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main_gui.cpp')
-rw-r--r--src/main_gui.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp
index b5c770530..80ea150f8 100644
--- a/src/main_gui.cpp
+++ b/src/main_gui.cpp
@@ -467,6 +467,17 @@ Hotkey<MainWindow> MainWindow::global_hotkeys[] = {
};
Hotkey<MainWindow> *_global_hotkeys = MainWindow::global_hotkeys;
+/**
+ * Does the given keycode match one of the keycodes bound to 'quit game'?
+ * @param keycode The keycode that was pressed by the user.
+ * @return True iff the keycode matches one of the hotkeys for 'quit'.
+ */
+bool IsQuitKey(uint16 keycode)
+{
+ int num = CheckHotkeyMatch<MainWindow>(_global_hotkeys, keycode, NULL);
+ return num == GHK_QUIT;
+}
+
void ShowSelectGameWindow();