mirror of
https://github.com/LCEMP/LCEMP.git
synced 2026-06-02 19:14:31 +00:00
feat: possibly fix saves
This commit is contained in:
@@ -978,6 +978,19 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
|
||||
ProfileManager.RichPresenceInit(4,1);
|
||||
ProfileManager.RegisterRichPresenceContext(CONTEXT_GAME_STATE);
|
||||
|
||||
// Ensure the GameHDD save directory exists at runtime (the 4J_Storage lib expects it)
|
||||
{
|
||||
wchar_t exePath[MAX_PATH];
|
||||
GetModuleFileNameW(NULL, exePath, MAX_PATH);
|
||||
wstring exeDir(exePath);
|
||||
size_t lastSlash = exeDir.find_last_of(L"\\/");
|
||||
if (lastSlash != wstring::npos)
|
||||
exeDir = exeDir.substr(0, lastSlash);
|
||||
wstring gameHDDPath = exeDir + L"\\Windows64\\GameHDD";
|
||||
CreateDirectoryW((exeDir + L"\\Windows64").c_str(), NULL);
|
||||
CreateDirectoryW(gameHDDPath.c_str(), NULL);
|
||||
}
|
||||
|
||||
// initialise the storage manager with a default save display name, a Minimum save size, and a callback for displaying the saving message
|
||||
StorageManager.Init(app.GetString(IDS_DEFAULT_SAVENAME),"savegame.dat",FIFTY_ONE_MB,&CConsoleMinecraftApp::DisplaySavingMessage,(LPVOID)&app);
|
||||
// Set up the global title storage path
|
||||
|
||||
Reference in New Issue
Block a user