update: ensure uid.dat exists at startup in client mode for multiplayer

This commit is contained in:
kuwacom 2026-03-06 14:49:16 +09:00
parent 9794389b2c
commit 72f25d7c04

View file

@ -42,6 +42,7 @@
#include "..\..\Minecraft.World\OldChunkStorage.h"
#include "Common/PostProcesser.h"
#include "Network\WinsockNetLayer.h"
#include "Windows64_Xuid.h"
#include "Xbox/resource.h"
@ -1221,6 +1222,12 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
Win64LaunchOptions launchOptions = ParseLaunchOptions();
ApplyScreenMode(launchOptions.screenMode);
// Ensure uid.dat exists from startup in client mode (before any multiplayer/login path).
if (!launchOptions.serverMode)
{
Win64Xuid::ResolvePersistentXuid();
}
// If no username, let's fall back
if (g_Win64Username[0] == 0)
{