diff options
author | Simon Howard | 2007-03-09 12:35:18 +0000 |
---|---|---|
committer | Simon Howard | 2007-03-09 12:35:18 +0000 |
commit | c5a4f04bc21825a0bdd59bef804229389a7a4ce1 (patch) | |
tree | bbdf0d16c1aa5e468698f0b202175bf7b32ccb83 /setup | |
parent | cebecf16cc349650bf2a9b20f24b2eac6372e07b (diff) | |
download | chocolate-doom-c5a4f04bc21825a0bdd59bef804229389a7a4ce1.tar.gz chocolate-doom-c5a4f04bc21825a0bdd59bef804229389a7a4ce1.tar.bz2 chocolate-doom-c5a4f04bc21825a0bdd59bef804229389a7a4ce1.zip |
Fix discrepancy between Doom and setup program when prompting for keys.
Add the ability to enable/disable key mappings so that the raw key can
be read in setup, exactly the same way that it is in Doom.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 846
Diffstat (limited to 'setup')
-rw-r--r-- | setup/txt_keyinput.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/setup/txt_keyinput.c b/setup/txt_keyinput.c index bdf2f926..b7e68f44 100644 --- a/setup/txt_keyinput.c +++ b/setup/txt_keyinput.c @@ -44,6 +44,11 @@ static int KeyPressCallback(txt_window_t *window, int key, *key_input->variable = key; TXT_EmitSignal(key_input, "set"); TXT_CloseWindow(window); + + // Re-enable key mappings now that we have the key + + TXT_EnableKeyMapping(1); + return 1; } else @@ -69,6 +74,10 @@ static void OpenPromptWindow(txt_key_input_t *key_input) TXT_SetWidgetAlign(label, TXT_HORIZ_CENTER); TXT_SetKeyListener(window, KeyPressCallback, key_input); + + // Disable key mappings while we prompt for the key press + + TXT_EnableKeyMapping(0); } static void TXT_KeyInputSizeCalc(TXT_UNCAST_ARG(key_input)) |