[XGI] Restrict XSessionCreate to offline sessions

Fixed Peggle from crashing after completing a level.
This commit is contained in:
Adrian 2025-06-22 18:28:08 +01:00
parent 20d3ac4ca9
commit 8c263ccb13
1 changed files with 10 additions and 0 deletions

View File

@ -182,6 +182,16 @@ X_HRESULT XgiApp::DispatchMessageSync(uint32_t message, uint32_t buffer_ptr,
uint32_t session_info_ptr = xe::load_and_swap<uint32_t>(buffer + 0x14);
uint32_t nonce_ptr = xe::load_and_swap<uint32_t>(buffer + 0x18);
// 584107FB expects offline session creation using flags 0 to succeed
// while offline.
// 58410889 expects stats session creation failure while offline.
//
// Allow offline session creation, but do not allow Xbox Live featured
// session creation.
if (flags) {
return 0x80155209; // X_ONLINE_E_SESSION_NOT_LOGGED_ON
}
XELOGD(
"XGISessionCreateImpl({:08X}, {:08X}, {}, {}, {:08X}, {:08X}, "
"{:08X})",