From 030e79e30257eaab46f34e86460d9b384dd64272 Mon Sep 17 00:00:00 2001 From: dborth Date: Fri, 2 Oct 2009 03:09:36 +0000 Subject: [PATCH] small bugfixes --- source/ngc/filebrowser.cpp | 8 +++++++- source/ngc/fileop.cpp | 6 ++++-- source/ngc/gui/gui_filebrowser.cpp | 2 +- source/ngc/networkop.cpp | 10 +++++++++- source/ngc/patch.cpp | 6 +++--- 5 files changed, 24 insertions(+), 8 deletions(-) diff --git a/source/ngc/filebrowser.cpp b/source/ngc/filebrowser.cpp index 7e4a93e..33a343e 100644 --- a/source/ngc/filebrowser.cpp +++ b/source/ngc/filebrowser.cpp @@ -281,6 +281,12 @@ bool MakeFilePath(char filepath[], int type, char * filename, int filenum) } else { + if(GCSettings.SaveMethod == DEVICE_AUTO) + GCSettings.SaveMethod = autoSaveMethod(SILENT); + + if(GCSettings.SaveMethod == DEVICE_AUTO) + return false; + switch(type) { case FILE_SRAM: @@ -686,7 +692,7 @@ OpenGameList () // change current dir to roms directory if(device > 0) - sprintf(browser.dir, "%s%s", pathPrefix[device], GCSettings.LoadFolder); + sprintf(browser.dir, "%s%s/", pathPrefix[device], GCSettings.LoadFolder); else browser.dir[0] = 0; diff --git a/source/ngc/fileop.cpp b/source/ngc/fileop.cpp index c94c2eb..eed6b2d 100644 --- a/source/ngc/fileop.cpp +++ b/source/ngc/fileop.cpp @@ -380,11 +380,9 @@ bool ChangeInterface(int device, bool silent) case DEVICE_DVD: mounted = MountDVD(silent); break; -#ifdef HW_RVL case DEVICE_SMB: mounted = ConnectShare(silent); break; -#endif case DEVICE_MC_SLOTA: mounted = TestMC(CARD_SLOTA, silent); break; @@ -527,6 +525,10 @@ ParseDirectory(bool waitParse) while(!IsDeviceRoot(browser.dir)) { char * devEnd = strrchr(browser.dir, '/'); + + if(devEnd == NULL) + break; + devEnd[0] = 0; // strip remaining file listing dirIter = diropen(browser.dir); if (dirIter) diff --git a/source/ngc/gui/gui_filebrowser.cpp b/source/ngc/gui/gui_filebrowser.cpp index 9713428..3025ddc 100644 --- a/source/ngc/gui/gui_filebrowser.cpp +++ b/source/ngc/gui/gui_filebrowser.cpp @@ -356,7 +356,7 @@ void GuiFileBrowser::Update(GuiTrigger * t) { delete fileListIcon[i]; fileListIcon[i] = NULL; - fileListText[i]->SetPosition(10,0); + fileListText[i]->SetPosition(5,0); } switch(browserList[browser.pageIndex+i].icon) diff --git a/source/ngc/networkop.cpp b/source/ngc/networkop.cpp index 918aff6..6481e65 100644 --- a/source/ngc/networkop.cpp +++ b/source/ngc/networkop.cpp @@ -8,7 +8,15 @@ * Network and SMB support routines ****************************************************************************/ -#ifdef HW_RVL +#ifdef HW_DOL + +bool +ConnectShare (bool silent) +{ + return false; +} + +#else #include #include diff --git a/source/ngc/patch.cpp b/source/ngc/patch.cpp index 6029d13..8cc0183 100644 --- a/source/ngc/patch.cpp +++ b/source/ngc/patch.cpp @@ -415,9 +415,9 @@ void LoadPatch() AllocSaveBuffer (); memset(patchpath, 0, sizeof(patchpath)); - sprintf(patchpath[0], "%s/%s.ips", browser.dir, Memory.ROMFilename); - sprintf(patchpath[1], "%s/%s.ups", browser.dir, Memory.ROMFilename); - sprintf(patchpath[2], "%s/%s.ppf", browser.dir, Memory.ROMFilename); + sprintf(patchpath[0], "%s%s.ips", browser.dir, Memory.ROMFilename); + sprintf(patchpath[1], "%s%s.ups", browser.dir, Memory.ROMFilename); + sprintf(patchpath[2], "%s%s.ppf", browser.dir, Memory.ROMFilename); for(patchtype=0; patchtype<3; patchtype++) {