From ea9a4b28ff5c585019d8d6bf17fee085a07ed102 Mon Sep 17 00:00:00 2001 From: Joostinonline Date: Tue, 5 Aug 2014 21:54:02 +0000 Subject: [PATCH] -Fixed buttons not registering as "held" when scrolling -Slightly increased the time between switching IOS's (look at the source, I don't know how to explain it) --- source/sysCheck.c | 2 +- source/tools.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/sysCheck.c b/source/sysCheck.c index 8025065..2fd483b 100644 --- a/source/sysCheck.c +++ b/source/sysCheck.c @@ -505,7 +505,7 @@ int main(int argc, char **argv) while (difftime (time(NULL),starttime) < 15) { wpressed = DetectInput(DI_BUTTONS_HELD); - usleep(50000); + usleep(80000); if (wpressed & WPAD_BUTTON_RIGHT && selectedIOS < (nbTitles-1)){ selectedIOS++; diff --git a/source/tools.c b/source/tools.c index 498ab1a..61478dd 100644 --- a/source/tools.c +++ b/source/tools.c @@ -91,7 +91,7 @@ u32 DetectInput(u8 DownOrHeld) { u32 pressed = 0; u16 gcpressed = 0; // Wii Remote (and Classic Controller) take precedence over GC to save time - if (WPAD_ScanPads() > WPAD_ERR_NONE) // Scan the Wii remotes. If there any problems, skip checking buttons + if (WPAD_ScanPads() >= WPAD_ERR_NONE) // Scan the Wii remotes. If there any problems, skip checking buttons { if (DownOrHeld == DI_BUTTONS_DOWN) { pressed = WPAD_ButtonsDown(0) | WPAD_ButtonsDown(1) | WPAD_ButtonsDown(2) | WPAD_ButtonsDown(3); //Store pressed buttons @@ -122,7 +122,7 @@ u32 DetectInput(u8 DownOrHeld) { if (pressed) return pressed; // No buttons on the Wii remote or Classic Controller were pressed - if (PAD_ScanPads() > PAD_ERR_NONE) + if (PAD_ScanPads() >= PAD_ERR_NONE) { if (DownOrHeld == DI_BUTTONS_HELD) { gcpressed = PAD_ButtonsHeld(0) | PAD_ButtonsHeld(1) | PAD_ButtonsHeld(2) | PAD_ButtonsHeld(3); //Store pressed buttons