feat: Windows64 local multiplayer support (#13)
- Skip QuadrantSignin (profile selector) on Windows64 in both LoadMenu and CreateWorldMenu, proceeding directly to local play since Xbox Live stubs always return true for IsSignedInLive() - Fix IsLocalMultiplayerAvailable() to not require IsHiDef() on Windows64 - Allow pad-connected players to join without a profile sign-in check - Fix ghost RemotePlayer creation by scanning all local player slots and matching on server-assigned player index rather than controller slot, fixing P3/P4 ghost entities when joining out of controller order - Give each player a unique name (Player 1-4) based on controller index instead of a single shared stub name - Use raw XInput (XInputGetState) for secondary controller join detection, bypassing the 4J toggle system which consumes all button presses before game logic runs; uses a 120-frame latch for a reliable detection window - Add .gitignore for Visual Studio build artifacts and output directories
This commit is contained in:
@@ -8956,7 +8956,11 @@ bool CMinecraftApp::IsLocalMultiplayerAvailable()
|
||||
if( InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i) ) ++connectedControllers;
|
||||
}
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
bool available = connectedControllers > 1;
|
||||
#else
|
||||
bool available = RenderManager.IsHiDef() && connectedControllers > 1;
|
||||
#endif
|
||||
|
||||
#ifdef __ORBIS__
|
||||
// Check for remote play
|
||||
|
||||
@@ -992,13 +992,18 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
|
||||
|
||||
#endif
|
||||
else
|
||||
{
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
// On Windows64, Xbox Live is unavailable. Skip QuadrantSignin and start directly.
|
||||
CreateGame(this, 0);
|
||||
#else
|
||||
//ProfileManager.RequestSignInUI(false, false, false, true, false,&CScene_MultiGameCreate::StartGame_SignInReturned, this,ProfileManager.GetPrimaryPad());
|
||||
SignInInfo info;
|
||||
info.Func = &UIScene_CreateWorldMenu::StartGame_SignInReturned;
|
||||
info.lpParam = this;
|
||||
info.requireOnline = m_MoreOptionsParams.bOnlineGame;
|
||||
ui.NavigateToScene(ProfileManager.GetPrimaryPad(),eUIScene_QuadrantSignin,&info);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1355,12 +1360,18 @@ int UIScene_CreateWorldMenu::ConfirmCreateReturned(void *pParam,int iPad,C4JStor
|
||||
|
||||
if(isClientSide && app.IsLocalMultiplayerAvailable())
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
// On Windows64, Xbox Live is unavailable. Skip QuadrantSignin and start directly.
|
||||
CreateGame(pClass, 0);
|
||||
return 0;
|
||||
#else
|
||||
//ProfileManager.RequestSignInUI(false, false, false, true, false,&UIScene_CreateWorldMenu::StartGame_SignInReturned, pClass,ProfileManager.GetPrimaryPad());
|
||||
SignInInfo info;
|
||||
info.Func = &UIScene_CreateWorldMenu::StartGame_SignInReturned;
|
||||
info.lpParam = pClass;
|
||||
info.requireOnline = pClass->m_MoreOptionsParams.bOnlineGame;
|
||||
ui.NavigateToScene(ProfileManager.GetPrimaryPad(),eUIScene_QuadrantSignin,&info);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1337,7 +1337,14 @@ int UIScene_LoadMenu::LoadDataComplete(void *pParam)
|
||||
#endif
|
||||
else
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
// On Windows64, IsSignedInLive() returns true as a stub but Xbox Live is
|
||||
// not available. Skip QuadrantSignin and proceed directly with local play.
|
||||
DWORD dwLocalUsersMask = CGameNetworkManager::GetLocalPlayerMask(ProfileManager.GetPrimaryPad());
|
||||
StartGameFromSave(pClass, dwLocalUsersMask);
|
||||
#else
|
||||
pClass->m_bRequestQuadrantSignin = true;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user