From e2bbccf7eb7b33b36faf39de964f6d8df5a51322 Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Tue, 10 Mar 2026 23:52:28 +1100 Subject: [PATCH] Remove Win32 local state types from join and load menus --- .../Platform/Common/UI/UIScene_JoinMenu.cpp | 10 ++++++---- .../Platform/Common/UI/UIScene_LoadMenu.cpp | 18 +++++++++--------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_JoinMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_JoinMenu.cpp index 4e773911d..7b3d42c61 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_JoinMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_JoinMenu.cpp @@ -387,8 +387,8 @@ int UIScene_JoinMenu::StartGame_SignInReturned(void *pParam,bool bContinue, int // Shared function to join the game that is the same whether we used the sign-in UI or not void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass) { - DWORD dwSignedInUsers = 0; bool noPrivileges = false; + int signedInUsers = 0; int localUsersMask = 0; bool isSignedInLive = true; int iPadNotSignedInLive = -1; @@ -402,6 +402,7 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass) { if(ProfileManager.IsSignedIn(index)) { + ++signedInUsers; if (isSignedInLive && !ProfileManager.IsSignedInLive(index)) { // Record the first non signed in live pad @@ -418,6 +419,7 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass) { if(ProfileManager.IsSignedIn(ProfileManager.GetPrimaryPad())) { + ++signedInUsers; if( !ProfileManager.AllowedToPlayMultiplayer(ProfileManager.GetPrimaryPad()) ) noPrivileges = true; localUsersMask |= CGameNetworkManager::GetLocalPlayerMask(ProfileManager.GetPrimaryPad()); @@ -457,8 +459,8 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass) // Check if user-created content is allowed, as we cannot play multiplayer if it's not bool noUGC = false; - BOOL pccAllowed = TRUE; - BOOL pccFriendsAllowed = TRUE; + bool pccAllowed = true; + bool pccFriendsAllowed = true; #if defined(__PS3__) || defined(__PSVITA__) if(isSignedInLive) @@ -485,7 +487,7 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass) pClass->m_bIgnoreInput=false; int messageText = IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_SINGLE_LOCAL; - if(dwSignedInUsers > 1) messageText = IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_ALL_LOCAL; + if(signedInUsers > 1) messageText = IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_ALL_LOCAL; ui.RequestUGCMessageBox(IDS_CONNECTION_FAILED, messageText); } diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_LoadMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_LoadMenu.cpp index 7482fabc2..3ac2a49ad 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_LoadMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_LoadMenu.cpp @@ -1205,8 +1205,8 @@ int UIScene_LoadMenu::LoadDataComplete(void *pParam) // Check if user-created content is allowed, as we cannot play multiplayer if it's not bool noUGC = false; - BOOL pccAllowed = TRUE; - BOOL pccFriendsAllowed = TRUE; + bool pccAllowed = true; + bool pccFriendsAllowed = true; bool bContentRestricted = false; ProfileManager.AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(),false,&pccAllowed,&pccFriendsAllowed); #if defined(__PS3__) || defined(__PSVITA__) @@ -1477,7 +1477,7 @@ void UIScene_LoadMenu::StartGameFromSave(UIScene_LoadMenu* pClass, int localUser LoadingInputParams *loadingParams = new LoadingInputParams(); loadingParams->func = &CGameNetworkManager::RunNetworkGameThreadProc; - loadingParams->lpParam = (LPVOID)param; + loadingParams->lpParam = param; // Reset the autosave time app.SetAutosaveTimerTime(); @@ -1514,7 +1514,7 @@ void UIScene_LoadMenu::LoadLevelGen(LevelGenerationOptions *levelGen) bool isClientSide = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) && m_MoreOptionsParams.bOnlineGame; // 4J Stu - If we only have one controller connected, then don't show the sign-in UI again - DWORD connectedControllers = 0; + int connectedControllers = 0; for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i) { if( InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i) ) ++connectedControllers; @@ -1525,8 +1525,8 @@ void UIScene_LoadMenu::LoadLevelGen(LevelGenerationOptions *levelGen) // Check if user-created content is allowed, as we cannot play multiplayer if it's not bool noUGC = false; - BOOL pccAllowed = TRUE; - BOOL pccFriendsAllowed = TRUE; + bool pccAllowed = true; + bool pccFriendsAllowed = true; ProfileManager.AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(),false,&pccAllowed,&pccFriendsAllowed); if(!pccAllowed && !pccFriendsAllowed) noUGC = true; @@ -1601,7 +1601,7 @@ void UIScene_LoadMenu::LoadLevelGen(LevelGenerationOptions *levelGen) LoadingInputParams *loadingParams = new LoadingInputParams(); loadingParams->func = &CGameNetworkManager::RunNetworkGameThreadProc; - loadingParams->lpParam = (LPVOID)param; + loadingParams->lpParam = param; // Reset the autosave time app.SetAutosaveTimerTime(); @@ -1685,8 +1685,8 @@ int UIScene_LoadMenu::StartGame_SignInReturned(void *pParam,bool bContinue, int // Check if user-created content is allowed, as we cannot play multiplayer if it's not bool noUGC = false; - BOOL pccAllowed = TRUE; - BOOL pccFriendsAllowed = TRUE; + bool pccAllowed = true; + bool pccFriendsAllowed = true; ProfileManager.AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(),false,&pccAllowed,&pccFriendsAllowed); if(!pccAllowed && !pccFriendsAllowed) noUGC = true;