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
This commit is contained in:
Matthew Toro
2026-03-08 04:10:15 -04:00
committed by GitHub
parent d461012efb
commit 3a5f1b6179
9 changed files with 803 additions and 73 deletions

View File

@@ -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;
}
};