summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2004-11-15 10:04:57 +0000
committertron <tron@openttd.org>2004-11-15 10:04:57 +0000
commit01e88bb61d00c96991d9280cea6bc188cc42db33 (patch)
tree3d1fd1b3ad405251c441a99e5d7150502f72b5c2
parent95a3e4fe1fa30090551a5d5edc8e5ba7b2a8c622 (diff)
downloadopenttd-01e88bb61d00c96991d9280cea6bc188cc42db33.tar.xz
(svn r623) -Feature: [ 1066504 ] Pause key pauses the game
-rw-r--r--main_gui.c5
-rw-r--r--sdl.c1
-rw-r--r--win32.c1
-rw-r--r--window.h1
4 files changed, 7 insertions, 1 deletions
diff --git a/main_gui.c b/main_gui.c
index 18a6ab132..dbacc2d67 100644
--- a/main_gui.c
+++ b/main_gui.c
@@ -1681,7 +1681,10 @@ static void MainToolbarWndProc(Window *w, WindowEvent *e)
if (local == 0xff) local = 0; // spectator
switch(e->keypress.keycode) {
- case WKC_F1: ToolbarPauseClick(w); break;
+ case WKC_F1:
+ case WKC_PAUSE:
+ ToolbarPauseClick(w);
+ break;
case WKC_F2: ShowGameOptions(); break;
case WKC_F3: MenuClickSaveLoad(0); break;
case WKC_F4: ShowSmallMap(); break;
diff --git a/sdl.c b/sdl.c
index 8e4a87e30..a78d436d1 100644
--- a/sdl.c
+++ b/sdl.c
@@ -357,6 +357,7 @@ static const VkMapping _vk_mapping[] = {
AM(SDLK_0, SDLK_9, '0', '9'),
AS(SDLK_ESCAPE, WKC_ESC),
+ AS(SDLK_PAUSE, WKC_PAUSE),
AS(SDLK_BACKSPACE, WKC_BACKSPACE),
AS(SDLK_SPACE, WKC_SPACE),
diff --git a/win32.c b/win32.c
index 20b4f1f09..2a7da5284 100644
--- a/win32.c
+++ b/win32.c
@@ -115,6 +115,7 @@ static const VkMapping _vk_mapping[] = {
AS(220, WKC_BACKQUOTE),
AS(VK_ESCAPE, WKC_ESC),
+ AS(VK_PAUSE, WKC_PAUSE),
AS(VK_BACK, WKC_BACKSPACE),
AM(VK_INSERT,VK_DELETE,WKC_INSERT, WKC_DELETE),
diff --git a/window.h b/window.h
index 510fdc6d8..92665b38f 100644
--- a/window.h
+++ b/window.h
@@ -128,6 +128,7 @@ enum WindowKeyCodes {
// we only store this key here, no matter what character is really mapped to it
// on a particular keyboard. (US keyboard: ` and ~ ; German keyboard: ^ and °)
WKC_BACKQUOTE = 45,
+ WKC_PAUSE = 46,
// 0-9 are mapped to 48-57
// A-Z are mapped to 65-90