diff options
author | Max Horn | 2008-09-15 22:43:20 +0000 |
---|---|---|
committer | Max Horn | 2008-09-15 22:43:20 +0000 |
commit | 05d78c26b442bccc1d1e773591900ad0d2087278 (patch) | |
tree | 8c44d59eef4897d8409ab216a5e9760ab4160038 /backends/platform/ds/arm9/source/touchkeyboard.cpp | |
parent | 880bc085b160c642e360332546fe90f47a5ea852 (diff) | |
download | scummvm-rg350-05d78c26b442bccc1d1e773591900ad0d2087278.tar.gz scummvm-rg350-05d78c26b442bccc1d1e773591900ad0d2087278.tar.bz2 scummvm-rg350-05d78c26b442bccc1d1e773591900ad0d2087278.zip |
DS: Backported 0.12 changes to trunk
svn-id: r34568
Diffstat (limited to 'backends/platform/ds/arm9/source/touchkeyboard.cpp')
-rw-r--r-- | backends/platform/ds/arm9/source/touchkeyboard.cpp | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/backends/platform/ds/arm9/source/touchkeyboard.cpp b/backends/platform/ds/arm9/source/touchkeyboard.cpp index 11832f4e3a..85f80fac92 100644 --- a/backends/platform/ds/arm9/source/touchkeyboard.cpp +++ b/backends/platform/ds/arm9/source/touchkeyboard.cpp @@ -402,6 +402,23 @@ void createKeyEvent(int keyNum, Common::Event& event) } } +void releaseAllKeys() { + for (int r = 0; r < DS_NUM_KEYS; r++) { + if (keys[r].pressed) { + DS::setKeyHighlight(r, false); + + OSystem_DS* system = OSystem_DS::instance(); + + Common::Event event; + createKeyEvent(r, event); + event.type = Common::EVENT_KEYUP; + system->addEvent(event); + + keys[r].pressed = false; + } + } +} + void addKeyboardEvents() { bool resetShift = false; @@ -446,7 +463,7 @@ void addKeyboardEvents() { // consolePrintf("Key: %d\n", r); if ((keys[r].character == Common::KEYCODE_INVALID)) { // Close button - DS::closed = true; + //DS::closed = true; } else { createKeyEvent(r, event); } @@ -492,9 +509,14 @@ void addKeyboardEvents() { OSystem_DS* system = OSystem_DS::instance(); Common::Event event; - createKeyEvent(r, event); - event.type = Common::EVENT_KEYUP; - system->addEvent(event); + if ((keys[r].character == Common::KEYCODE_INVALID)) { + // Close button + DS::closed = true; + } else { + createKeyEvent(r, event); + event.type = Common::EVENT_KEYUP; + system->addEvent(event); + } keys[r].pressed = false; |