summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/doom/m_menu.c3
-rw-r--r--src/heretic/mn_menu.c3
-rw-r--r--src/hexen/mn_menu.c3
-rw-r--r--src/m_config.c6
-rw-r--r--src/m_controls.c2
-rw-r--r--src/m_controls.h1
-rw-r--r--src/setup/keyboard.c2
-rw-r--r--src/strife/m_menu.c5
8 files changed, 22 insertions, 3 deletions
diff --git a/src/doom/m_menu.c b/src/doom/m_menu.c
index 85a0cd76..36f7f809 100644
--- a/src/doom/m_menu.c
+++ b/src/doom/m_menu.c
@@ -1662,7 +1662,8 @@ boolean M_Responder (event_t* ev)
return true;
}
- if (devparm && key == key_menu_help)
+ if ((devparm && key == key_menu_help) ||
+ key == key_menu_screenshot)
{
G_ScreenShot ();
return true;
diff --git a/src/heretic/mn_menu.c b/src/heretic/mn_menu.c
index ab80d860..a8e5d30f 100644
--- a/src/heretic/mn_menu.c
+++ b/src/heretic/mn_menu.c
@@ -1112,7 +1112,8 @@ boolean MN_Responder(event_t * event)
return (true); //make the info screen eat the keypress
}
- if (ravpic && key == KEY_F1)
+ if ((ravpic && key == KEY_F1) ||
+ key == key_menu_screenshot)
{
G_ScreenShot();
return (true);
diff --git a/src/hexen/mn_menu.c b/src/hexen/mn_menu.c
index a6dbd19e..84a8a3ec 100644
--- a/src/hexen/mn_menu.c
+++ b/src/hexen/mn_menu.c
@@ -1212,7 +1212,8 @@ boolean MN_Responder(event_t * event)
return (true); //make the info screen eat the keypress
}
- if (ravpic && key == KEY_F1)
+ if ((ravpic && key == KEY_F1) ||
+ key == key_menu_screenshot)
{
G_ScreenShot();
return (true);
diff --git a/src/m_config.c b/src/m_config.c
index 50ce48b9..3f0c24cf 100644
--- a/src/m_config.c
+++ b/src/m_config.c
@@ -1172,6 +1172,12 @@ static default_t extra_defaults_list[] =
CONFIG_VARIABLE_KEY(key_menu_decscreen),
//!
+ // Keyboard shortcut to save a screenshot.
+ //
+
+ CONFIG_VARIABLE_KEY(key_menu_screenshot),
+
+ //!
// Key to toggle the map view.
//
diff --git a/src/m_controls.c b/src/m_controls.c
index 59fe1115..bcc819ea 100644
--- a/src/m_controls.c
+++ b/src/m_controls.c
@@ -179,6 +179,7 @@ int key_menu_gamma = KEY_F11;
int key_menu_incscreen = KEY_EQUALS;
int key_menu_decscreen = KEY_MINUS;
+int key_menu_screenshot = 0;
//
// Joystick controls
@@ -370,6 +371,7 @@ void M_BindMenuControls(void)
M_BindVariable("key_menu_incscreen", &key_menu_incscreen);
M_BindVariable("key_menu_decscreen", &key_menu_decscreen);
+ M_BindVariable("key_menu_screenshot",&key_menu_screenshot);
M_BindVariable("key_demo_quit", &key_demo_quit);
M_BindVariable("key_spy", &key_spy);
}
diff --git a/src/m_controls.h b/src/m_controls.h
index 67b3e1a1..ff3f7774 100644
--- a/src/m_controls.h
+++ b/src/m_controls.h
@@ -128,6 +128,7 @@ extern int key_menu_gamma;
extern int key_menu_incscreen;
extern int key_menu_decscreen;
+extern int key_menu_screenshot;
extern int mousebfire;
extern int mousebstrafe;
diff --git a/src/setup/keyboard.c b/src/setup/keyboard.c
index 670f0c92..930d2714 100644
--- a/src/setup/keyboard.c
+++ b/src/setup/keyboard.c
@@ -64,6 +64,7 @@ static int *shortcuts[] = { &key_menu_help, &key_menu_save, &key_menu_load,
&key_menu_endgame, &key_menu_messages, &key_spy,
&key_menu_qload, &key_menu_quit, &key_menu_gamma,
&key_menu_incscreen, &key_menu_decscreen,
+ &key_menu_screenshot,
&key_message_refresh, &key_multi_msg,
&key_multi_msgplayer[0], &key_multi_msgplayer[1],
&key_multi_msgplayer[2], &key_multi_msgplayer[3] };
@@ -309,6 +310,7 @@ static void OtherKeysDialog(TXT_UNCAST_ARG(widget), TXT_UNCAST_ARG(unused))
AddKeyControl(table, "Increase screen size", &key_menu_incscreen);
AddKeyControl(table, "Decrease screen size", &key_menu_decscreen);
+ AddKeyControl(table, "Save a screenshot", &key_menu_screenshot);
AddKeyControl(table, "Display last message", &key_message_refresh);
AddKeyControl(table, "Finish recording demo", &key_demo_quit);
diff --git a/src/strife/m_menu.c b/src/strife/m_menu.c
index e278bc74..d66495c1 100644
--- a/src/strife/m_menu.c
+++ b/src/strife/m_menu.c
@@ -2086,6 +2086,11 @@ boolean M_Responder (event_t* ev)
G_ScreenShot();
return true;
}
+ else if (key == key_menu_screenshot)
+ {
+ G_ScreenShot();
+ return true;
+ }
}
// Pop-up menu?