aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruruk2014-02-14 05:09:34 +0100
committeruruk2014-02-14 05:09:34 +0100
commit370e5969b5d8affc8752c4ca3aa5050337454039 (patch)
treec191f141190b9189ddf48f40031d9d0cefd3756a
parentb46224ef3d529befdea8cdf085813e9a633b3517 (diff)
downloadscummvm-rg350-370e5969b5d8affc8752c4ca3aa5050337454039.tar.gz
scummvm-rg350-370e5969b5d8affc8752c4ca3aa5050337454039.tar.bz2
scummvm-rg350-370e5969b5d8affc8752c4ca3aa5050337454039.zip
AVALANCHE: Don't use cctype in Help anymore.
-rw-r--r--engines/avalanche/help.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/avalanche/help.cpp b/engines/avalanche/help.cpp
index 2314843146..b6a0975362 100644
--- a/engines/avalanche/help.cpp
+++ b/engines/avalanche/help.cpp
@@ -29,7 +29,6 @@
#include "avalanche/avalanche.h"
#include "avalanche/help.h"
-#include <cctype>
namespace Avalanche {
@@ -204,7 +203,11 @@ bool Help::handleKeyboard(const Common::Event &event) {
return true;
for (int i = 0; i < _buttonNum; i++) {
- char upperCase = toupper(event.kbd.ascii);
+ char upperCase = 255; // Dummy value.
+ if ((97 <= event.kbd.ascii) && (event.kbd.ascii <= 122)) {
+ upperCase = event.kbd.ascii - 32;
+ }
+
if (((Common::KEYCODE_a <= event.kbd.keycode) && (event.kbd.keycode <= Common::KEYCODE_z) && (_buttons[i]._trigger == upperCase)) ||
((event.kbd.keycode == Common::KEYCODE_PAGEUP) && (_buttons[i]._trigger == 214)) ||
((event.kbd.keycode == Common::KEYCODE_PAGEDOWN) && (_buttons[i]._trigger == 216))) { // We had to handle the pageups/pagedowns separately.