Fix a crash upon relaunching after removing a SD/USB device (InfiniteBlueGX) (#446)

This commit is contained in:
saulfabreg Wii VC Project 2022-10-25 10:09:08 -05:00 committed by GitHub
parent 14210941ad
commit b15c3c7dc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -848,7 +848,9 @@ bool LoadPrefs()
FixInvalidSettings(); FixInvalidSettings();
// attempt to create directories if they don't exist // attempt to create directories if they don't exist
if(GCSettings.LoadMethod == DEVICE_SD || GCSettings.LoadMethod == DEVICE_USB) { if((GCSettings.LoadMethod == DEVICE_SD && ChangeInterface(DEVICE_SD, SILENT))
|| (GCSettings.LoadMethod == DEVICE_USB && ChangeInterface(DEVICE_USB, SILENT)))
{
char dirPath[MAXPATHLEN]; char dirPath[MAXPATHLEN];
sprintf(dirPath, "%s%s", pathPrefix[GCSettings.LoadMethod], GCSettings.ScreenshotsFolder); sprintf(dirPath, "%s%s", pathPrefix[GCSettings.LoadMethod], GCSettings.ScreenshotsFolder);
CreateDirectory(dirPath); CreateDirectory(dirPath);