mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 11:49:06 +00: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:
parent
07fd17445c
commit
83c5446d85
23 changed files with 86 additions and 54 deletions
|
@ -169,7 +169,7 @@ static std::optional<SPIRVCodeVector> CompileShaderToSPV(EShLanguage stage,
|
|||
}
|
||||
|
||||
stream << "\n";
|
||||
stream << "Dolphin Version: " + Common::scm_rev_str + "\n";
|
||||
stream << "Dolphin Version: " + Common::GetScmRevStr() + "\n";
|
||||
stream << "Video Backend: " + g_video_backend->GetDisplayName();
|
||||
|
||||
PanicAlertFmt("{} (written to {})", msg, filename);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue