Init the file paths much earlier, as soon as the EXE is started
This allows for the GUI to also access the Cxbx path variable.
This commit is contained in:
parent
033ff9fa94
commit
f5d0b27134
|
@ -59,6 +59,9 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
|||
return 1;
|
||||
}
|
||||
|
||||
/* Initialize Cxbx File Paths */
|
||||
CxbxInitFilePaths();
|
||||
|
||||
/*! initialize shared memory */
|
||||
EmuShared::Init();
|
||||
|
||||
|
|
|
@ -396,8 +396,6 @@ void CxbxKrnlMain(int argc, char* argv[])
|
|||
RestoreExeImageHeader();
|
||||
}
|
||||
|
||||
CxbxInitFilePaths();
|
||||
|
||||
CxbxRestoreContiguousMemory(szFilePath_memory_bin);
|
||||
|
||||
CxbxRestorePersistentMemoryRegions();
|
||||
|
@ -801,7 +799,7 @@ void CxbxInitFilePaths()
|
|||
// Make sure our data folder exists :
|
||||
int result = SHCreateDirectoryEx(nullptr, szFolder_CxbxReloadedData, nullptr);
|
||||
if ((result != ERROR_SUCCESS) && (result != ERROR_ALREADY_EXISTS))
|
||||
CxbxKrnlCleanup("CxbxInitFilePaths : Couldn't create Cxbx-Reloaded AppData folder!");
|
||||
CxbxKrnlCleanup("CxbxInitFilePaths : Couldn't create Cxbx-Reloaded AppData folder!");
|
||||
|
||||
snprintf(szFilePath_LaunchDataPage_bin, MAX_PATH, "%s\\CxbxLaunchDataPage.bin", szFolder_CxbxReloadedData);
|
||||
snprintf(szFilePath_EEPROM_bin, MAX_PATH, "%s\\EEPROM.bin", szFolder_CxbxReloadedData);
|
||||
|
|
Loading…
Reference in New Issue