diff --git a/rpcs3/rpcs3qt/gui_application.cpp b/rpcs3/rpcs3qt/gui_application.cpp index e538836484..f940b7d78b 100644 --- a/rpcs3/rpcs3qt/gui_application.cpp +++ b/rpcs3/rpcs3qt/gui_application.cpp @@ -11,6 +11,7 @@ #include "localized_emu.h" #include "qt_camera_handler.h" #include "qt_music_handler.h" +#include "rpcs3_version.h" #ifdef WITH_DISCORD_RPC #include "_discord_utils.h" @@ -29,11 +30,13 @@ #include #include +#include #include #include #include #include #include +#include #include @@ -63,6 +66,36 @@ bool gui_application::Init() setWindowIcon(QIcon(":/rpcs3.ico")); #endif + if (!rpcs3::is_release_build() && !rpcs3::is_local_build()) + { + const std::string_view branch_name = rpcs3::get_full_branch(); + gui_log.warning("Experimental Build Warning! Build origin: %s", branch_name); + + QMessageBox msg; + msg.setWindowTitle(tr("Experimental Build Warning")); + msg.setIcon(QMessageBox::Critical); + msg.setTextFormat(Qt::RichText); + msg.setStandardButtons(QMessageBox::Yes | QMessageBox::No); + msg.setDefaultButton(QMessageBox::No); + msg.setText(QString(tr( + R"( +

+ Please understand that this build is not an official RPCS3 release.
+ This build contains changes that may break games, or even damage your data.
+ We recommend to download and use the official build from the RPCS3 website.

+ Build origin: %1
+ Do you wish to use this build anyway? +

+ )" + )).arg(Qt::convertFromPlainText(branch_name.data()))); + msg.layout()->setSizeConstraint(QLayout::SetFixedSize); + + if (msg.exec() == QMessageBox::No) + { + return false; + } + } + m_emu_settings.reset(new emu_settings()); m_gui_settings.reset(new gui_settings()); m_persistent_settings.reset(new persistent_settings()); diff --git a/rpcs3/rpcs3qt/main_window.cpp b/rpcs3/rpcs3qt/main_window.cpp index 56b94ed826..1b4e93a704 100644 --- a/rpcs3/rpcs3qt/main_window.cpp +++ b/rpcs3/rpcs3qt/main_window.cpp @@ -132,36 +132,6 @@ bool main_window::Init([[maybe_unused]] bool with_cli_boot) Q_EMIT RequestGlobalStylesheetChange(); ConfigureGuiFromSettings(); - if (!rpcs3::is_release_build() && !rpcs3::is_local_build()) - { - const std::string_view branch_name = rpcs3::get_full_branch(); - gui_log.warning("Experimental Build Warning! Build origin: %s", branch_name); - - QMessageBox msg; - msg.setWindowTitle(tr("Experimental Build Warning")); - msg.setIcon(QMessageBox::Critical); - msg.setTextFormat(Qt::RichText); - msg.setStandardButtons(QMessageBox::Yes | QMessageBox::No); - msg.setDefaultButton(QMessageBox::No); - msg.setText(QString(tr( - R"( -

- Please understand that this build is not an official RPCS3 release.
- This build contains changes that may break games, or even damage your data.
- We recommend to download and use the official build from the RPCS3 website.

- Build origin: %1
- Do you wish to use this build anyway? -

- )" - )).arg(Qt::convertFromPlainText(branch_name.data()))); - msg.layout()->setSizeConstraint(QLayout::SetFixedSize); - - if (msg.exec() == QMessageBox::No) - { - return false; - } - } - m_shortcut_handler = new shortcut_handler(gui::shortcuts::shortcut_handler_id::main_window, this, m_gui_settings); connect(m_shortcut_handler, &shortcut_handler::shortcut_activated, this, &main_window::handle_shortcut);