aboutsummaryrefslogtreecommitdiff
path: root/backends/platform
diff options
context:
space:
mode:
authorAndre Heider2009-02-15 20:38:51 +0000
committerAndre Heider2009-02-15 20:38:51 +0000
commit3d5b349b7c881c6b208ceff7b0960a5a324b561c (patch)
tree92d3516483e9f802fccb924d4602c400473b45de /backends/platform
parent1436fbe05d2b0c3a734d6fbd5f63172150949716 (diff)
downloadscummvm-rg350-3d5b349b7c881c6b208ceff7b0960a5a324b561c.tar.gz
scummvm-rg350-3d5b349b7c881c6b208ceff7b0960a5a324b561c.tar.bz2
scummvm-rg350-3d5b349b7c881c6b208ceff7b0960a5a324b561c.zip
check the result of PAD_ScanPads() to trigger button up/down events only once. requires a not yet official libogc patch.
svn-id: r38294
Diffstat (limited to 'backends/platform')
-rw-r--r--backends/platform/wii/osystem_events.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/backends/platform/wii/osystem_events.cpp b/backends/platform/wii/osystem_events.cpp
index ac7225e39c..c90063ff14 100644
--- a/backends/platform/wii/osystem_events.cpp
+++ b/backends/platform/wii/osystem_events.cpp
@@ -276,13 +276,13 @@ bool OSystem_Wii::pollEvent(Common::Event &event) {
return true;
}
- u32 bd, bh, bu;
+ u32 bd = 0, bh = 0, bu = 0;
- PAD_ScanPads();
-
- bd = PAD_ButtonsDown(0);
- bh = PAD_ButtonsHeld(0);
- bu = PAD_ButtonsUp(0);
+ if (PAD_ScanPads() & 1) {
+ bd = PAD_ButtonsDown(0);
+ bh = PAD_ButtonsHeld(0);
+ bu = PAD_ButtonsUp(0);
+ }
#ifndef GAMECUBE
WPAD_ScanPads();