mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 21:30:19 -06:00
Fix static initialisation order fiasco issue for Version variables
Fixes a crash that could occur if the static constructor function for the MainSettings.cpp TU happened to run before the variables in Common/Version.cpp are initialised. (This is known as the static initialisation order fiasco.) By using wrapper functions, those variables are now guaranteed to be constructed on first use.
This commit is contained in:
@ -170,7 +170,7 @@ bool NetPlayIndex::Add(const NetPlaySession& session)
|
||||
"&password=" + std::to_string(session.has_password) + "&method=" + session.method +
|
||||
"&server_id=" + session.server_id + "&in_game=" + std::to_string(session.in_game) +
|
||||
"&port=" + std::to_string(session.port) + "&player_count=" +
|
||||
std::to_string(session.player_count) + "&version=" + Common::scm_desc_str,
|
||||
std::to_string(session.player_count) + "&version=" + Common::GetScmDescStr(),
|
||||
{{"X-Is-Dolphin", "1"}}, Common::HttpRequest::AllowedReturnCodes::All);
|
||||
|
||||
if (!response.has_value())
|
||||
|
Reference in New Issue
Block a user