diff options
| author | Matthew Toro <48634881+mattsumi@users.noreply.github.com> | 2026-03-08 04:10:15 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-08 03:10:15 -0500 |
| commit | 3a5f1b617931d00145504d97ef4fbef4f3138b5b (patch) | |
| tree | 925a71e25f2b9256f85c50833585a791e44771de /Minecraft.Client/Common/Network/SessionInfo.h | |
| parent | d461012efb3855d1fbfe9dc3696562223f21334a (diff) | |
Add "Add Server" functionally to "Join Game" Menu + relocate servers.txt to servers.db. (#911)
* Add "Add Server" functionally to "Join Game" Menu + relocate servers.txt to servers.db
* enchancement: add edit and delete server functionality, solves FriendSessionInfo corruption issues
Diffstat (limited to 'Minecraft.Client/Common/Network/SessionInfo.h')
| -rw-r--r-- | Minecraft.Client/Common/Network/SessionInfo.h | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/Minecraft.Client/Common/Network/SessionInfo.h b/Minecraft.Client/Common/Network/SessionInfo.h index ce6365bc..7b3629ff 100644 --- a/Minecraft.Client/Common/Network/SessionInfo.h +++ b/Minecraft.Client/Common/Network/SessionInfo.h @@ -119,9 +119,36 @@ public: hasPartyMember = false; } + FriendSessionInfo(const FriendSessionInfo& other) + { + sessionId = other.sessionId; +#ifdef _XBOX + searchResult = other.searchResult; +#elif defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__) + searchResult = other.searchResult; +#elif defined(_DURANGO) + searchResult = other.searchResult; +#endif + displayLabelLength = other.displayLabelLength; + displayLabelViewableStartIndex = other.displayLabelViewableStartIndex; + data = other.data; + hasPartyMember = other.hasPartyMember; + if (other.displayLabel != NULL) + { + displayLabel = new wchar_t[displayLabelLength + 1]; + wcscpy_s(displayLabel, displayLabelLength + 1, other.displayLabel); + } + else + { + displayLabel = NULL; + } + } + + FriendSessionInfo& operator=(const FriendSessionInfo&) = delete; + ~FriendSessionInfo() { if (displayLabel != NULL) - delete displayLabel; + delete[] displayLabel; } }; |
