fix: consoles & dpad being binded to 2 settings

This commit is contained in:
str1k3r committed 2026-09-29 16:41:13 -04:00
1 parent 02da402490
commit fed6871356
150 files changed
+19314 -431

No files matched your search

@@ -12,10 +12,11 @@
// Singleton
OrbisNPToolkit NPToolkit;
#if 0
sce::Toolkit::NP::Utilities::Future< sce::Toolkit::NP::NpSessionInformation > OrbisNPToolkit::sm_createJoinFuture;
sce::Toolkit::NP::NpSessionInformation OrbisNPToolkit::m_currentSessionInfo;
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::MessageAttachment> OrbisNPToolkit::m_messageData;
#endif
void OrbisNPToolkit::presenceCallback( const sce::Toolkit::NP::Event& event )
{
@@ -130,29 +131,25 @@ void OrbisNPToolkit::sessionsCallback( const sce::Toolkit::NP::Event& event)
{
case sce::Toolkit::NP::Event::npSessionCreateResult: ///< An event generated when the %Np session creation process has been completed.
app.DebugPrintf("npSessionCreateResult");
if(sm_createJoinFuture.hasResult())
if(event.returnCode >= 0)
{
app.DebugPrintf("Session Created Successfully\n");
m_currentSessionInfo = *sm_createJoinFuture.get();
}
else
{
app.DebugPrintf("Session Creation Failed 0x%x\n",sm_createJoinFuture.getError());
}
sm_createJoinFuture.reset();
else
{
app.DebugPrintf("Session Creation Failed 0x%x\n",event.returnCode);
}
break;
case sce::Toolkit::NP::Event::npSessionJoinResult: ///< An event generated when the join %Np session process has been completed.
app.DebugPrintf("npSessionJoinResult");
if(sm_createJoinFuture.hasResult())
if(event.returnCode >= 0)
{
app.DebugPrintf("Session joined successfully\n");
m_currentSessionInfo = *sm_createJoinFuture.get();
}
else
{
app.DebugPrintf("Session join Failed 0x%x\n",sm_createJoinFuture.getError());
}
sm_createJoinFuture.reset();
else
{
app.DebugPrintf("Session join Failed 0x%x\n",event.returnCode);
}
break;
case sce::Toolkit::NP::Event::npSessionError: ///< An event generated when there was error performing the current %Np session process.
app.DebugPrintf("npSessionError");
@@ -206,29 +203,7 @@ void OrbisNPToolkit::gameCustomDataCallback( const sce::Toolkit::NP::Event& even
app.DebugPrintf("gameCustomDataItemListResult");
break;
case sce::Toolkit::NP::Event::gameCustomDataGameDataResult:
app.DebugPrintf("gameCustomDataGameDataResult");
if(m_messageData.hasResult())
{
SQRNetworkManager_Orbis::GetInviteDataAndProcess(m_messageData.get());
}
else
{
app.DebugPrintf("gameCustomDataMessageResult error 0x%08x\n", m_messageData.getError());
UINT uiIDA[1] = { IDS_OK };
switch(m_messageData.getError())
{
case SCE_NP_ERROR_LATEST_PATCH_PKG_EXIST:
case SCE_NP_ERROR_LATEST_PATCH_PKG_DOWNLOADED:
app.ShowPatchAvailableError();
break;
case SCE_NP_ERROR_AGE_RESTRICTION:
default:
ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1);
break;
}
}
app.DebugPrintf("gameCustomDataGameDataResult STUB, returnCode 0x%08x\n", event.returnCode);
break;
case sce::Toolkit::NP::Event::gameCustomDataMessageResult:
app.DebugPrintf("gameCustomDataMessageResult");
@@ -350,23 +325,14 @@ void OrbisNPToolkit::init()
}
// Get network status and inform library
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::NetStateBasic> netStateFuture = sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::NetStateBasic>();
sce::Toolkit::NP::NetInfo::Interface::getNetInfo(&netStateFuture);
// Wait for the net state (< 5ms)
while (netStateFuture.isBusy())
int32_t netState = SCE_NET_CTL_STATE_DISCONNECTED;
if (sceNetCtlGetState(&netState) == SCE_OK)
{
Sleep(1);
}
if (netStateFuture.hasResult())
{
sce::Toolkit::NP::NetStateBasic *netState = netStateFuture.get();
ProfileManager.SetNetworkStatus(netState->connectionStatus == SCE_NET_CTL_STATE_IPOBTAINED);
ProfileManager.SetNetworkStatus(netState == SCE_NET_CTL_STATE_IPOBTAINED);
}
else
{
// Error message means we're disconnected
// Error means we're disconnected
ProfileManager.SetNetworkStatus(false);
}
@@ -409,7 +375,7 @@ void OrbisNPToolkit::createNPSession()
char test[3] = {'R','K','B'};
createSessionRequest.sessionData= test;
createSessionRequest.sessionDataSize = 3;
ret = sce::Toolkit::NP::Sessions::Interface::create(&createSessionRequest,&sm_createJoinFuture);
app.DebugPrintf("createNPSession STUB\n");
}
@@ -447,12 +413,7 @@ void OrbisNPToolkit::getMessageData(SceNpGameCustomDataEventParam* paramData)
req.itemId = paramData->itemId;
req.userInfo.userId = userId;
ret = sce::Toolkit::NP::GameCustomData::Interface::getGameData(&req, &m_messageData);
if( ret < 0 ) {
//Error handling
} else {
//Error handling
}
app.DebugPrintf("getMessageData STUB\n");
//