From 8c263ccb13156cdacdf3c31689dd45b2e2b728ad Mon Sep 17 00:00:00 2001 From: Adrian <78108584+AdrianCassar@users.noreply.github.com> Date: Sun, 22 Jun 2025 18:28:08 +0100 Subject: [PATCH] [XGI] Restrict XSessionCreate to offline sessions Fixed Peggle from crashing after completing a level. --- src/xenia/kernel/xam/apps/xgi_app.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/xenia/kernel/xam/apps/xgi_app.cc b/src/xenia/kernel/xam/apps/xgi_app.cc index 086af2fda..7ea975789 100644 --- a/src/xenia/kernel/xam/apps/xgi_app.cc +++ b/src/xenia/kernel/xam/apps/xgi_app.cc @@ -182,6 +182,16 @@ X_HRESULT XgiApp::DispatchMessageSync(uint32_t message, uint32_t buffer_ptr, uint32_t session_info_ptr = xe::load_and_swap(buffer + 0x14); uint32_t nonce_ptr = xe::load_and_swap(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})",