mirror of
https://git.minecraftlegacy.com/backups/LCEMP.git
synced 2026-11-24 22:10:17 +00:00
feat: possibly fix saves
This commit is contained in:
1 parent
21a5a4aef0
commit
14dd49de96
3 files changed
+16
-4
No files matched your search
@@ -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