From b15c3c7dc6d90117fb8f41e8fef5735072b39447 Mon Sep 17 00:00:00 2001 From: saulfabreg Wii VC Project Date: Tue, 25 Oct 2022 10:09:08 -0500 Subject: [PATCH] Fix a crash upon relaunching after removing a SD/USB device (InfiniteBlueGX) (#446) --- source/preferences.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/preferences.cpp b/source/preferences.cpp index 802dfae..5bbf211 100644 --- a/source/preferences.cpp +++ b/source/preferences.cpp @@ -848,7 +848,9 @@ bool LoadPrefs() FixInvalidSettings(); // 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]; sprintf(dirPath, "%s%s", pathPrefix[GCSettings.LoadMethod], GCSettings.ScreenshotsFolder); CreateDirectory(dirPath);