summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2011-01-13 20:34:55 +0000
committerSimon Howard2011-01-13 20:34:55 +0000
commitec169fd1c28b2ba3b6b6fc7e7123e9d27516dd5f (patch)
treee34c063acdef202278daa9efc2f651d87c60f92e
parent5130b54658ab03f3fc18727615b529d6e241566c (diff)
downloadchocolate-doom-ec169fd1c28b2ba3b6b6fc7e7123e9d27516dd5f.tar.gz
chocolate-doom-ec169fd1c28b2ba3b6b6fc7e7123e9d27516dd5f.tar.bz2
chocolate-doom-ec169fd1c28b2ba3b6b6fc7e7123e9d27516dd5f.zip
In configuration files, use the scan code for right shift, not left
shift, to match Vanilla (thanks AlexXav). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2238
-rw-r--r--NEWS2
-rw-r--r--setup/configfile.c14
-rw-r--r--src/m_config.c14
3 files changed, 26 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index c5a4cfaa..56f71593 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,8 @@
Bugs fixed:
* Menu navigation when using joystick/joypad (thanks AlexXav).
+ * For configuration file value for shift keys, use scan code for
+ right shift, not left shift (thanks AlexXav).
1.5.0 (2011-01-02):
diff --git a/setup/configfile.c b/setup/configfile.c
index c4e8a408..c7109739 100644
--- a/setup/configfile.c
+++ b/setup/configfile.c
@@ -417,8 +417,18 @@ static void SaveDefaultCollection(default_collection_t *collection)
v = * (int *) defaults[i].location;
- if (defaults[i].untranslated
- && v == defaults[i].original_translated)
+ if (v == KEY_RSHIFT)
+ {
+ // Special case: for shift, force scan code for
+ // right shift, as this is what Vanilla uses.
+ // This overrides the change check below, to fix
+ // configuration files made by old versions that
+ // mistakenly used the scan code for left shift.
+
+ v = 54;
+ }
+ else if (defaults[i].untranslated
+ && v == defaults[i].original_translated)
{
// Has not been changed since the last time we
// read the config file.
diff --git a/src/m_config.c b/src/m_config.c
index 332b8b95..04d0a963 100644
--- a/src/m_config.c
+++ b/src/m_config.c
@@ -1217,8 +1217,18 @@ static void SaveDefaultCollection(default_collection_t *collection)
v = * (int *) defaults[i].location;
- if (defaults[i].untranslated
- && v == defaults[i].original_translated)
+ if (v == KEY_RSHIFT)
+ {
+ // Special case: for shift, force scan code for
+ // right shift, as this is what Vanilla uses.
+ // This overrides the change check below, to fix
+ // configuration files made by old versions that
+ // mistakenly used the scan code for left shift.
+
+ v = 54;
+ }
+ else if (defaults[i].untranslated
+ && v == defaults[i].original_translated)
{
// Has not been changed since the last time we
// read the config file.