ref: 974692ac456d003a3da3f21b9fb0d4400d62ee77
parent: 7d8526e3ba91fef73e5c6129cce9a629cb3c8bb4
parent: 624e4b2f132608222ccd85ccdbad97e2c84a60d2
author: Simon Howard <[email protected]>
date: Thu Mar 20 06:23:49 EDT 2014
Merge pull request #364 from fabiangreffrath/key_screenshot Add a dedicated key for taking screenshots.
--- a/src/doom/m_menu.c
+++ b/src/doom/m_menu.c
@@ -1662,7 +1662,8 @@
return true;
}
- if (devparm && key == key_menu_help)
+ if ((devparm && key == key_menu_help) ||
+ key == key_menu_screenshot)
{
G_ScreenShot ();
return true;
--- a/src/heretic/mn_menu.c
+++ b/src/heretic/mn_menu.c
@@ -1112,7 +1112,8 @@
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);
--- a/src/hexen/mn_menu.c
+++ b/src/hexen/mn_menu.c
@@ -1212,7 +1212,8 @@
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);
--- a/src/m_config.c
+++ b/src/m_config.c
@@ -1172,6 +1172,12 @@
CONFIG_VARIABLE_KEY(key_menu_decscreen),
//!
+ // Keyboard shortcut to save a screenshot.
+ //
+
+ CONFIG_VARIABLE_KEY(key_menu_screenshot),
+
+ //!
// Key to toggle the map view.
//
--- a/src/m_controls.c
+++ b/src/m_controls.c
@@ -179,6 +179,7 @@
int key_menu_incscreen = KEY_EQUALS;
int key_menu_decscreen = KEY_MINUS;
+int key_menu_screenshot = -1;
//
// Joystick controls
@@ -370,6 +371,7 @@
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);
}
--- a/src/m_controls.h
+++ b/src/m_controls.h
@@ -128,6 +128,7 @@
extern int key_menu_incscreen;
extern int key_menu_decscreen;
+extern int key_menu_screenshot;
extern int mousebfire;
extern int mousebstrafe;
--- a/src/setup/keyboard.c
+++ b/src/setup/keyboard.c
@@ -64,6 +64,7 @@
&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 @@
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);
--- a/src/strife/m_menu.c
+++ b/src/strife/m_menu.c
@@ -2086,6 +2086,11 @@
G_ScreenShot();
return true;
}
+ else if (key == key_menu_screenshot)
+ {
+ G_ScreenShot();
+ return true;
+ }
}
// Pop-up menu?