when unable to load the default rom directory, just drop into device

root. don't show an error when unable to find a load device.
This commit is contained in:
Daryl 2020-07-23 14:31:03 -06:00
parent 7e2bbbb9ac
commit 09c3376827

View File

@ -78,8 +78,6 @@ int autoLoadMethod()
device = DEVICE_DVD;
else if(ChangeInterface(DEVICE_SMB, SILENT))
device = DEVICE_SMB;
else
ErrorPrompt("Unable to locate a load device!");
if(GCSettings.LoadMethod == DEVICE_AUTO)
GCSettings.LoadMethod = device; // save device found for later use
@ -672,15 +670,31 @@ int
OpenGameList ()
{
int device = GCSettings.LoadMethod;
bool autoLoad = false;
if(device == DEVICE_AUTO && strlen(GCSettings.LoadFolder) > 0)
if(device == DEVICE_AUTO && strlen(GCSettings.LoadFolder) > 0) {
device = autoLoadMethod();
autoLoad = true;
}
// change current dir to roms directory
if(device > 0)
if(device > 0) {
sprintf(browser.dir, "%s%s/", pathPrefix[device], GCSettings.LoadFolder);
else
if(autoLoad) {
DIR *dir = opendir(browser.dir);
if(dir == NULL) {
sprintf(browser.dir, "%s", pathPrefix[device]);
}
else {
closedir(dir);
}
}
}
else {
browser.dir[0] = 0;
}
BrowserChangeFolder();
return browser.numEntries;