[XAM/XLIVE] - Set proper returns when offline

- Have XLive functions return their offline values.
- Have XGIUserReadStats return X_ONLINE_E_LOGON_NOT_LOGGED_ON
This commit is contained in:
The-Little-Wolf
2025-12-17 16:53:45 -08:00
committed by Radosław Gliński
parent 492fa7c632
commit 169fea978a
2 changed files with 18 additions and 12 deletions

View File

@@ -242,9 +242,7 @@ X_HRESULT XgiApp::DispatchMessageSync(uint32_t message, uint32_t buffer_ptr,
xe::be<uint32_t> results_guest_address;
}* data = reinterpret_cast<XUserReadStats*>(buffer);
if (!data->results_guest_address) {
return 1;
}
return 0x80151802; // X_ONLINE_E_LOGON_NOT_LOGGED_ON
}
case 0x000B0036: {
// Called after opening xbox live arcade and clicking on xbox live v5759

View File

@@ -38,30 +38,38 @@ X_HRESULT XLiveBaseApp::DispatchMessageSync(uint32_t message,
return X_E_FAIL;
}
case 0x00058003: {
// Called on startup of dashboard (netplay build)
XELOGD("XLiveBaseLogonGetHR, unimplemented");
return X_E_SUCCESS;
/* Notes:
- Called on startup of dashboard (netplay build)
- used by other internet funtions to check if online (e.g.
XamGetLiveHiveValueA)
- Return is Saved elsewhere and used here
*/
XELOGD("XLiveBaseLogonGetHR, implemented in netplay");
return 0x001510F1; // X_ONLINE_S_LOGON_DISCONNECTED
}
case 0x00058004: {
// Called on startup, seems to just return a bool in the buffer.
/* Notes:
- Called on startup, seems to just return a bool in the buffer.
- It is Saved elsewhere and used here
*/
assert_true(!buffer_length || buffer_length == 4);
XELOGD("XLiveBaseGetLogonId({:08X})", buffer_ptr);
xe::store_and_swap<uint32_t>(buffer + 0, 1); // ?
xe::store_and_swap<uint32_t>(buffer, 1); // ?
return X_E_SUCCESS;
}
case 0x00058006: {
// Buffer only set when online
assert_true(!buffer_length || buffer_length == 4);
XELOGD("XLiveBaseGetNatType({:08X})", buffer_ptr);
xe::store_and_swap<uint32_t>(buffer + 0, 1); // XONLINE_NAT_OPEN
return X_E_SUCCESS;
return 0x80151802; // X_ONLINE_E_LOGON_NOT_LOGGED_ON
}
case 0x00058007: {
// Occurs if title calls XOnlineGetServiceInfo, expects dwServiceId
// and pServiceInfo. pServiceInfo should contain pointer to
// XONLINE_SERVICE_INFO structure.
XELOGD("CXLiveLogon::GetServiceInfo({:08X}, {:08X})", buffer_ptr,
XELOGD("XLiveBaseOnlineGetServiceInfo({:08X}, {:08X})", buffer_ptr,
buffer_length);
return 0x80151802; // ERROR_CONNECTION_INVALID
return 0x80151802; // X_ONLINE_E_LOGON_NOT_LOGGED_ON
}
case 0x00058020: {
// 0x00058004 is called right before this.