Skip to content

Commit

Permalink
[XAM] Updated XNetGetTitleXnAddr
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianCassar committed Dec 23, 2023
1 parent 7030ce0 commit 788b94b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ It should also be noted that due to the way Steam Decks handle configuration, yo
| CS:GO | Mousehook |
| CS:GO Beta | Mousehook |
| Call of Duty 2 | ```launch_module = "default_mp.xex"``` | [Deathmatch](https://www.youtube.com/watch?v=DR9Op_f1UUw) |
| Death Tank | |
| DiRT | | [Race](https://www.youtube.com/watch?v=udMf-MUzpEc) |
| GTA V Beta | Requires ```protect_zero = false``` or use patches. | [Beta Showcase](https://www.youtube.com/watch?v=nIjZ7sRGZlo), [Beta Showcase](https://www.youtube.com/watch?v=YIBjy5ZJcq4) | [TU 13](https://github.com/AdrianCassar/Xenia-WebServices/blob/main/patches/545408A7%20-%20Grand%20Theft%20Auto%20V%20(TU13).patch.toml), [TU 10](https://github.com/AdrianCassar/Xenia-WebServices/blob/main/patches/545408A7%20-%20Grand%20Theft%20Auto%20V%20(TU10).patch.toml) |
| GTA V TU 2-13 | Must complete prologue, download gamesave [here](https://cdn.discordapp.com/attachments/641360906495983616/1101132116441440366/545408A7.rar). Unstable and often crashes. | [Solo Session](https://www.youtube.com/watch?v=lap7liW6pco) |
Expand All @@ -115,6 +116,7 @@ It should also be noted that due to the way Steam Decks handle configuration, yo
| Splinter Cell: Double Agent | |
| Star Wars Battlefront III (Unreleased Game) | Alpha, Mar 17 2008 | [Conquest Taoonie](https://www.youtube.com/watch?v=C54jCqFnCmQ), [MP Event Stream](https://www.youtube.com/watch?v=xSpTmsSvP4s) |
| Team Fortress 2 | Mousehook |
| The Outfit | |
---

### Non-Supported Games
Expand Down
6 changes: 3 additions & 3 deletions src/xenia/kernel/XLiveAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,15 @@ void XLiveAPI::Init() {
}
}

GetLocalIP();
mac_address = GetMACaddress();

if (cvars::offline_mode) {
XELOGI("Offline mode enabled!");
initialized_ = true;
return;
}

GetLocalIP();
mac_address = GetMACaddress();

Getwhoami();

if (!IsOnline()) {
Expand Down
3 changes: 2 additions & 1 deletion src/xenia/kernel/xam/apps/xgi_app.cc
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ X_HRESULT XgiApp::DispatchMessageSync(uint32_t message, uint32_t buffer_ptr,
XELOGI("XSessionMigrateHost({:08X});", buffer_length);

if (data->session_info_ptr == NULL) {
XELOGI("XSessionMigrateHost Failed!");
return X_E_SUCCESS;
}

Expand All @@ -354,7 +355,7 @@ X_HRESULT XgiApp::DispatchMessageSync(uint32_t message, uint32_t buffer_ptr,
return X_E_SUCCESS;
}

for (int i = 0; i < 16; i++) {
for (int i = 0; i < sizeof(XLiveAPI::XNKEY); i++) {
sessionInfo->keyExchangeKey.ab[i] = i;
}

Expand Down
6 changes: 5 additions & 1 deletion src/xenia/kernel/xam/xam_net.cc
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,11 @@ dword_result_t NetDll_XNetGetTitleXnAddr_entry(dword_t caller,
pointer_t<XNADDR> addr_ptr) {
// Wait for NetDll_WSAStartup or XNetStartup to setup XLiveAPI.
if (!XLiveAPI::is_initialized()) {
return XnAddrStatus::XNET_GET_XNADDR_NONE;
// Call of Duty 2 - does not call XNetStartup or WSAStartup before
// XNetGetTitleXnAddr.
XLiveAPI::Init();

return XnAddrStatus::XNET_GET_XNADDR_PENDING;
}

auto status = XnAddrStatus::XNET_GET_XNADDR_STATIC |
Expand Down

0 comments on commit 788b94b

Please sign in to comment.