mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 12:19:12 +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
|
@ -206,7 +206,7 @@ MainWindow::MainWindow(std::unique_ptr<BootParameters> boot_parameters,
|
|||
const std::string& movie_path)
|
||||
: QMainWindow(nullptr)
|
||||
{
|
||||
setWindowTitle(QString::fromStdString(Common::scm_rev_str));
|
||||
setWindowTitle(QString::fromStdString(Common::GetScmRevStr()));
|
||||
setWindowIcon(Resources::GetAppIcon());
|
||||
setUnifiedTitleAndToolBarOnMac(true);
|
||||
setAcceptDrops(true);
|
||||
|
@ -1145,7 +1145,7 @@ void MainWindow::HideRenderWidget(bool reinit, bool is_exit)
|
|||
m_rendering_to_main = false;
|
||||
m_stack->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
|
||||
disconnect(Host::GetInstance(), &Host::RequestTitle, this, &MainWindow::setWindowTitle);
|
||||
setWindowTitle(QString::fromStdString(Common::scm_rev_str));
|
||||
setWindowTitle(QString::fromStdString(Common::GetScmRevStr()));
|
||||
}
|
||||
|
||||
// The following code works around a driver bug that would lead to Dolphin crashing when changing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue