mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 00:20:01 +00:00
Qt: only init new UI the first time it is about to be shown
This commit is contained in:
parent
f0d25d2fd9
commit
e3712182bd
@ -95,7 +95,9 @@ AppHandler::~AppHandler()
|
||||
void AppHandler::exit()
|
||||
{
|
||||
app_exiting = true;
|
||||
qApp->closeAllWindows();
|
||||
|
||||
if (qApp)
|
||||
qApp->closeAllWindows();
|
||||
}
|
||||
|
||||
bool AppHandler::isExiting() const
|
||||
|
@ -131,7 +131,7 @@ void ui_companion_driver_init_first(void)
|
||||
ui_companion = (ui_companion_driver_t*)ui_companion_init_first();
|
||||
|
||||
#ifdef HAVE_QT
|
||||
if (settings->bools.desktop_menu_enable)
|
||||
if (settings->bools.desktop_menu_enable && settings->bools.ui_companion_toggle)
|
||||
{
|
||||
ui_companion_qt_data = ui_companion_qt.init();
|
||||
qt_is_inited = true;
|
||||
@ -159,8 +159,16 @@ void ui_companion_driver_toggle(bool force)
|
||||
|
||||
#ifdef HAVE_QT
|
||||
if (settings->bools.desktop_menu_enable)
|
||||
if (ui_companion_qt.toggle)
|
||||
{
|
||||
if ((settings->bools.ui_companion_toggle || force) && !qt_is_inited)
|
||||
{
|
||||
ui_companion_qt_data = ui_companion_qt.init();
|
||||
qt_is_inited = true;
|
||||
}
|
||||
|
||||
if (qt_is_inited && ui_companion_qt.toggle)
|
||||
ui_companion_qt.toggle(ui_companion_qt_data, force);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user