mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/GabsPuNs-MinecraftConsoles.git
synced 2026-07-14 03:38:21 +00:00
Revert DXGI_SWAP_EFFECT_FLIP_DISCARD
The game does not support it properly.
This commit is contained in:
@@ -1403,41 +1403,9 @@ int UIScene_LoadCreateJoinMenu::KeyboardCompleteWorldNameCallback(LPVOID lpParam
|
||||
// check the name is valid
|
||||
if(ui16Text[0]!=0)
|
||||
{
|
||||
#if (defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined(__PSVITA__))
|
||||
#if (defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined(__PSVITA__)) // defined(_WINDOWS64) TODO: RenameSaveData need to be implemented
|
||||
// open the save and overwrite the metadata
|
||||
StorageManager.RenameSaveData(pClass->m_iSaveListIndex - pClass->m_iDefaultButtonsC, ui16Text,&UIScene_LoadCreateJoinMenu::RenameSaveDataReturned,pClass);
|
||||
#elif defined(_WINDOWS64)
|
||||
{
|
||||
int listPos = pClass->m_iSaveListIndex - pClass->m_iDefaultButtonsC;
|
||||
|
||||
// Convert the ui16Text input to a wide string
|
||||
wchar_t wNewName[128] = {};
|
||||
for (int k = 0; k < 127 && ui16Text[k]; k++)
|
||||
wNewName[k] = static_cast<wchar_t>(ui16Text[k]);
|
||||
|
||||
// Convert to narrow for storage and in-memory update
|
||||
char narrowName[128] = {};
|
||||
wcstombs_s(nullptr, narrowName, sizeof(narrowName), wNewName, _TRUNCATE);
|
||||
|
||||
// Build the sidecar path: Windows64\GameHDD\{folder}\worldname.txt
|
||||
wchar_t wFilename[MAX_SAVEFILENAME_LENGTH] = {};
|
||||
mbstowcs_s(nullptr, wFilename, MAX_SAVEFILENAME_LENGTH, pClass->m_saveDetails[listPos].UTF8SaveFilename, _TRUNCATE);
|
||||
wstring sidecarPath = wstring(L"Windows64\\GameHDD\\") + wstring(wFilename) + wstring(L"\\worldname.txt");
|
||||
|
||||
FILE *fw = nullptr;
|
||||
if (_wfopen_s(&fw, sidecarPath.c_str(), L"w") == 0 && fw)
|
||||
{
|
||||
fputs(narrowName, fw);
|
||||
fclose(fw);
|
||||
}
|
||||
|
||||
// Update the in-memory display name so the list reflects it immediately
|
||||
strncpy_s(pClass->m_saveDetails[listPos].UTF8SaveName, narrowName, 127);
|
||||
pClass->m_saveDetails[listPos].UTF8SaveName[127] = '\0';
|
||||
|
||||
// Reuse the existing callback to trigger the list repopulate
|
||||
UIScene_LoadCreateJoinMenu::RenameSaveDataReturned(pClass, true);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
@@ -2254,8 +2222,6 @@ void UIScene_LoadCreateJoinMenu::LoadSaveFromDisk(File *saveFile, ESavePlatform
|
||||
fis.read(ba);
|
||||
fis.close();
|
||||
|
||||
|
||||
|
||||
bool isClientSide = false;
|
||||
bool isPrivate = false;
|
||||
int maxPlayers = MINECRAFT_NET_MAX_PLAYERS;
|
||||
|
||||
Reference in New Issue
Block a user