From 69270c14abadd10c3ee9ae0c19035dbd1e7c839e Mon Sep 17 00:00:00 2001 From: dborth Date: Thu, 16 Jul 2009 17:47:37 +0000 Subject: [PATCH] fix shift key, game save bug --- readme.txt | 6 ++++++ source/ngc/fileop.cpp | 12 +++++++++++- source/ngc/fileop.h | 2 +- source/ngc/gui/gui_keyboard.cpp | 10 +++++++++- source/ngc/menu.cpp | 2 +- 5 files changed, 28 insertions(+), 4 deletions(-) diff --git a/readme.txt b/readme.txt index d9cee26..14a24e6 100644 --- a/readme.txt +++ b/readme.txt @@ -46,6 +46,12 @@ Wii homebrew is WiiBrew (www.wiibrew.org). | UPDATE HISTORY | •˜———–—––-- - —————————––––– ———–—––-- - —————————––––– ———–—––-- - ————————• +[4.0.9] + +* Fixed "No game saves found." message when there are actually saves. +* Fixed shift key on keyboard +* Text scrolling works again + [4.0.8 - July 9, 2009] * Faster SMB/USB browsing diff --git a/source/ngc/fileop.cpp b/source/ngc/fileop.cpp index c977ff7..5a26f1e 100644 --- a/source/ngc/fileop.cpp +++ b/source/ngc/fileop.cpp @@ -411,7 +411,7 @@ bool ParseDirEntries() * Browse subdirectories **************************************************************************/ int -ParseDirectory(int method) +ParseDirectory(int method, bool waitParse) { char fulldir[MAXPATHLEN]; char msg[128]; @@ -463,6 +463,16 @@ ParseDirectory(int method) ParseDirEntries(); // index first 20 entries LWP_ResumeThread(parsethread); // index remaining entries + if(waitParse) // wait for complete parsing + { + ShowAction("Loading..."); + + while(!LWP_ThreadIsSuspended(parsethread)) + usleep(THREAD_SLEEP); + + CancelAction(); + } + return browser.numEntries; } diff --git a/source/ngc/fileop.h b/source/ngc/fileop.h index 68b7a9a..e679a5b 100644 --- a/source/ngc/fileop.h +++ b/source/ngc/fileop.h @@ -29,7 +29,7 @@ void HaltDeviceThread(); void MountAllFAT(); void UnmountAllFAT(); bool ChangeInterface(int method, bool silent); -int ParseDirectory(int method); +int ParseDirectory(int method, bool waitParse = false); void AllocSaveBuffer(); void FreeSaveBuffer(); u32 LoadFile(char * rbuffer, char *filepath, u32 length, int method, bool silent); diff --git a/source/ngc/gui/gui_keyboard.cpp b/source/ngc/gui/gui_keyboard.cpp index 954114e..75a2040 100644 --- a/source/ngc/gui/gui_keyboard.cpp +++ b/source/ngc/gui/gui_keyboard.cpp @@ -304,6 +304,8 @@ void GuiKeyboard::Update(GuiTrigger * t) char txt[2] = { 0, 0 }; + startloop: + for(int i=0; i<4; i++) { for(int j=0; j<11; j++) @@ -327,7 +329,6 @@ void GuiKeyboard::Update(GuiTrigger * t) if(shift || caps) { kbtextstr[strlen(kbtextstr)] = keys[i][j].chShift; - if(shift) shift ^= 1; } else { @@ -336,6 +337,13 @@ void GuiKeyboard::Update(GuiTrigger * t) } kbText->SetText(GetDisplayText(kbtextstr)); keyBtn[i][j]->SetState(STATE_SELECTED, t->chan); + + if(shift) + { + shift ^= 1; + update = true; + goto startloop; + } } } } diff --git a/source/ngc/menu.cpp b/source/ngc/menu.cpp index a11f6fc..8871d45 100644 --- a/source/ngc/menu.cpp +++ b/source/ngc/menu.cpp @@ -1626,7 +1626,7 @@ static int MenuGameSaves(int action) else { strncpy(browser.dir, GCSettings.SaveFolder, 200); - ParseDirectory(GCSettings.SaveMethod); + ParseDirectory(GCSettings.SaveMethod, true); } len = strlen(Memory.ROMFilename);