From 3d5b349b7c881c6b208ceff7b0960a5a324b561c Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Sun, 15 Feb 2009 20:38:51 +0000 Subject: check the result of PAD_ScanPads() to trigger button up/down events only once. requires a not yet official libogc patch. svn-id: r38294 --- backends/platform/wii/osystem_events.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'backends/platform') 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(); -- cgit v1.2.3