mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 23:11:25 +12:00
Don't use std::exit during Qt initialization
This commit is contained in:
parent
7ce835e878
commit
2865865382
12 changed files with 62 additions and 22 deletions
|
@ -50,7 +50,7 @@ gui_application::~gui_application()
|
|||
#endif
|
||||
}
|
||||
|
||||
void gui_application::Init()
|
||||
bool gui_application::Init()
|
||||
{
|
||||
setWindowIcon(QIcon(":/rpcs3.ico"));
|
||||
|
||||
|
@ -58,6 +58,11 @@ void gui_application::Init()
|
|||
m_gui_settings.reset(new gui_settings());
|
||||
m_persistent_settings.reset(new persistent_settings());
|
||||
|
||||
if (!m_emu_settings->Init())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Get deprecated active user (before August 2nd 2020)
|
||||
QString active_user = m_gui_settings->GetValue(gui::um_active_user).toString();
|
||||
|
||||
|
@ -91,9 +96,9 @@ void gui_application::Init()
|
|||
welcome->exec();
|
||||
}
|
||||
|
||||
if (m_main_window)
|
||||
if (m_main_window && !m_main_window->Init())
|
||||
{
|
||||
m_main_window->Init();
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef WITH_DISCORD_RPC
|
||||
|
@ -103,6 +108,8 @@ void gui_application::Init()
|
|||
discord::initialize();
|
||||
}
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void gui_application::SwitchTranslator(QTranslator& translator, const QString& filename, const QString& language_code)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue