summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2014-03-23 21:06:02 -0400
committerSimon Howard2014-03-23 21:06:02 -0400
commit84f136b51e07b4d9815c6b033e897ebaef4f16a7 (patch)
treece378d9b1baede8e1c0b6476097f2ede09a378ca
parent7a7a66e0af1be72938616b04ebebe6bd9dbd706c (diff)
downloadchocolate-doom-84f136b51e07b4d9815c6b033e897ebaef4f16a7.tar.gz
chocolate-doom-84f136b51e07b4d9815c6b033e897ebaef4f16a7.tar.bz2
chocolate-doom-84f136b51e07b4d9815c6b033e897ebaef4f16a7.zip
Set default for key_menu_screenshot to 0.
In #364 I recommended -1 as the default to avoid taking screenshots in some situations where a key event is posted for key 0. It turns out that wasn't such a great idea, as -1 is not parsed properly by the config parser, and is shown as ??-1 in the setup tool. Default to zero instead, and add guards to prevent screenshots being taken by mistake. Thanks to Alexandre-Xavier for pointing this out.
-rw-r--r--src/doom/m_menu.c2
-rw-r--r--src/heretic/mn_menu.c2
-rw-r--r--src/hexen/mn_menu.c2
-rw-r--r--src/m_controls.c2
-rw-r--r--src/strife/m_menu.c2
5 files changed, 5 insertions, 5 deletions
diff --git a/src/doom/m_menu.c b/src/doom/m_menu.c
index 36f7f809..c1329953 100644
--- a/src/doom/m_menu.c
+++ b/src/doom/m_menu.c
@@ -1663,7 +1663,7 @@ boolean M_Responder (event_t* ev)
}
if ((devparm && key == key_menu_help) ||
- key == key_menu_screenshot)
+ (key != 0 && key == key_menu_screenshot))
{
G_ScreenShot ();
return true;
diff --git a/src/heretic/mn_menu.c b/src/heretic/mn_menu.c
index a8e5d30f..1c94b20b 100644
--- a/src/heretic/mn_menu.c
+++ b/src/heretic/mn_menu.c
@@ -1113,7 +1113,7 @@ boolean MN_Responder(event_t * event)
}
if ((ravpic && key == KEY_F1) ||
- key == key_menu_screenshot)
+ (key != 0 && key == key_menu_screenshot))
{
G_ScreenShot();
return (true);
diff --git a/src/hexen/mn_menu.c b/src/hexen/mn_menu.c
index 84a8a3ec..900a9bdb 100644
--- a/src/hexen/mn_menu.c
+++ b/src/hexen/mn_menu.c
@@ -1213,7 +1213,7 @@ boolean MN_Responder(event_t * event)
}
if ((ravpic && key == KEY_F1) ||
- key == key_menu_screenshot)
+ (key != 0 && key == key_menu_screenshot))
{
G_ScreenShot();
return (true);
diff --git a/src/m_controls.c b/src/m_controls.c
index 294c0b6f..bcc819ea 100644
--- a/src/m_controls.c
+++ b/src/m_controls.c
@@ -179,7 +179,7 @@ int key_menu_gamma = KEY_F11;
int key_menu_incscreen = KEY_EQUALS;
int key_menu_decscreen = KEY_MINUS;
-int key_menu_screenshot = -1;
+int key_menu_screenshot = 0;
//
// Joystick controls
diff --git a/src/strife/m_menu.c b/src/strife/m_menu.c
index d66495c1..27a9045c 100644
--- a/src/strife/m_menu.c
+++ b/src/strife/m_menu.c
@@ -2086,7 +2086,7 @@ boolean M_Responder (event_t* ev)
G_ScreenShot();
return true;
}
- else if (key == key_menu_screenshot)
+ else if (key != 0 && key == key_menu_screenshot)
{
G_ScreenShot();
return true;