[Scummvm-cvs-logs] scummvm master -> 94f7d01882543c5e173a456f7a865c05ce81dd81
lordhoto
lordhoto at gmail.com
Fri Feb 14 20:15:35 CET 2014
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
94f7d01882 TOUCHE: Use keycodes for hotkey handling.
Commit: 94f7d01882543c5e173a456f7a865c05ce81dd81
https://github.com/scummvm/scummvm/commit/94f7d01882543c5e173a456f7a865c05ce81dd81
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2014-02-14T11:09:14-08:00
Commit Message:
TOUCHE: Use keycodes for hotkey handling.
Changed paths:
engines/touche/menu.cpp
engines/touche/touche.cpp
diff --git a/engines/touche/menu.cpp b/engines/touche/menu.cpp
index 85ca519..045b594 100644
--- a/engines/touche/menu.cpp
+++ b/engines/touche/menu.cpp
@@ -569,29 +569,29 @@ int ToucheEngine::displayQuitDialog() {
quitLoop = true;
switch (_language) {
case Common::FR_FRA:
- if (event.kbd.ascii == 'o' || event.kbd.ascii == 'O') {
+ if (event.kbd.keycode == Common::KEYCODE_o) {
ret = 1;
}
break;
case Common::DE_DEU:
- if (event.kbd.ascii == 'j' || event.kbd.ascii == 'J') {
+ if (event.kbd.keycode == Common::KEYCODE_j) {
ret = 1;
}
break;
case Common::ES_ESP:
- if (event.kbd.ascii == 's' || event.kbd.ascii == 'S') {
+ if (event.kbd.keycode == Common::KEYCODE_s) {
ret = 1;
}
break;
case Common::PL_POL:
- if (event.kbd.ascii == 's' || event.kbd.ascii == 'S' || event.kbd.ascii == 't' || event.kbd.ascii == 'T') {
+ if (event.kbd.keycode == Common::KEYCODE_s || event.kbd.keycode == Common::KEYCODE_t) {
ret = 1;
}
break;
default:
// According to cyx, the Italian version uses the same
// keys as the English one.
- if (event.kbd.ascii == 'y' || event.kbd.ascii == 'Y') {
+ if (event.kbd.keycode == Common::KEYCODE_y) {
ret = 1;
}
break;
diff --git a/engines/touche/touche.cpp b/engines/touche/touche.cpp
index b3e3ca5..eb7010a 100644
--- a/engines/touche/touche.cpp
+++ b/engines/touche/touche.cpp
@@ -416,13 +416,13 @@ void ToucheEngine::processEvents(bool handleKeyEvents) {
this->getDebugger()->onFrame();
}
} else {
- if (event.kbd.ascii == 't') {
+ if (event.kbd.keycode == Common::KEYCODE_t) {
++_talkTextMode;
if (_talkTextMode == kTalkModeCount) {
_talkTextMode = 0;
}
displayTextMode(-(92 + _talkTextMode));
- } else if (event.kbd.ascii == ' ') {
+ } else if (event.kbd.keycode == Common::KEYCODE_SPACE) {
updateKeyCharTalk(2);
}
}
More information about the Scummvm-git-logs
mailing list