diff options
author | Matthew Stewart | 2018-02-17 21:38:04 -0500 |
---|---|---|
committer | Eugene Sandulenko | 2018-04-07 09:30:07 +0200 |
commit | c36a5f339555d11353ecbd704e4c812e77d4a0ae (patch) | |
tree | 99d8ba532e44fcfd4bcb0c23b13c3528bd3f96df /backends/platform/ds/arm9/source | |
parent | a43f914abefaae80dd91c496ba5b77b46fb9d8d2 (diff) | |
download | scummvm-rg350-c36a5f339555d11353ecbd704e4c812e77d4a0ae.tar.gz scummvm-rg350-c36a5f339555d11353ecbd704e4c812e77d4a0ae.tar.bz2 scummvm-rg350-c36a5f339555d11353ecbd704e4c812e77d4a0ae.zip |
DS: Fix touch input
Diffstat (limited to 'backends/platform/ds/arm9/source')
-rw-r--r-- | backends/platform/ds/arm9/source/dsmain.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/backends/platform/ds/arm9/source/dsmain.cpp b/backends/platform/ds/arm9/source/dsmain.cpp index ac030dbe2e..e44e360d5b 100644 --- a/backends/platform/ds/arm9/source/dsmain.cpp +++ b/backends/platform/ds/arm9/source/dsmain.cpp @@ -2499,7 +2499,7 @@ void penUpdate() { // if (getKeysHeld() & KEY_L) consolePrintf("%d, %d penX=%d, penY=%d tz=%d\n", IPC->touchXpx, IPC->touchYpx, penX, penY, IPC->touchZ1); - bool penDownThisFrame = (IPC->touchZ1 > 0) && (IPC->touchXpx > 0) && (IPC->touchYpx > 0); + bool penDownThisFrame = (!(IPC->buttons & 0x40)) && (IPC->touchXpx > 0) && (IPC->touchYpx > 0); static bool moved = false; if (( (tapScreenClicks) || getKeyboardEnable() ) && (getIsDisplayMode8Bit())) { @@ -2626,7 +2626,7 @@ void penUpdate() { penDownSaved = true; } - if ((IPC->touchZ1 > 0) && (IPC->touchXpx > 0) && (IPC->touchYpx > 0)) { + if ((!(IPC->buttons & 0x40)) && (IPC->touchXpx > 0) && (IPC->touchYpx > 0)) { penX = IPC->touchXpx + touchXOffset; penY = IPC->touchYpx + touchYOffset; moved = true; @@ -2648,7 +2648,7 @@ void penUpdate() { - if ((IPC->touchZ1 > 0) || ((penDownFrames == 2)) ) { + if ((!(IPC->buttons & 0x40)) || ((penDownFrames == 2)) ) { penDownLastFrame = true; penDownFrames++; } else { |