aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2002-07-12 10:31:45 +0000
committerMax Horn2002-07-12 10:31:45 +0000
commit1eac3c98962b562a35b2ef5916d81350b3436a48 (patch)
treef048f1e11e50e8cb79d90e8e172ad2ed20b1b21b
parentbf142bccdfd6326217c2964ad668a21350d0b3ff (diff)
downloadscummvm-rg350-1eac3c98962b562a35b2ef5916d81350b3436a48.tar.gz
scummvm-rg350-1eac3c98962b562a35b2ef5916d81350b3436a48.tar.bz2
scummvm-rg350-1eac3c98962b562a35b2ef5916d81350b3436a48.zip
fixed space bar bug in Save dialog. Dudes, why not use standard functions/macros instead of reinventing the broken wheel? 8-)
svn-id: r4519
-rw-r--r--gui.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/gui.cpp b/gui.cpp
index 539e000db7..65a132a4bd 100644
--- a/gui.cpp
+++ b/gui.cpp
@@ -27,6 +27,8 @@
#include "guimaps.h"
#include "config-file.h"
+#include <ctype.h>
+
#define hline(x, y, x2, color) line(x, y, x2, y, color);
#define vline(x, y, y2, color) line(x, y, x, y2, color);
@@ -1120,7 +1122,7 @@ void Gui::checkHotKey(int keycode)
// Only check for widgets that are on the current GUI page (otherwise save dialog problems occur)
if (w->_page == page) {
// Check the actual key pressed, and the uppercase version. For people who have caps lock on
- if (keycode == w->_hotkey || (keycode - 32) == w->_hotkey)
+ if (keycode == w->_hotkey || toupper(keycode) == w->_hotkey)
handleCommand(w->_id);
}
w++;