mirror of
https://github.com/libretro/RetroArch
synced 2025-02-12 00:40:26 +00:00
Merge pull request #6686 from bparker06/qt_defer_init
Qt: only init new UI the first time it is about to be shown
This commit is contained in:
commit
b247962115
@ -95,7 +95,9 @@ AppHandler::~AppHandler()
|
|||||||
void AppHandler::exit()
|
void AppHandler::exit()
|
||||||
{
|
{
|
||||||
app_exiting = true;
|
app_exiting = true;
|
||||||
qApp->closeAllWindows();
|
|
||||||
|
if (qApp)
|
||||||
|
qApp->closeAllWindows();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AppHandler::isExiting() const
|
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();
|
ui_companion = (ui_companion_driver_t*)ui_companion_init_first();
|
||||||
|
|
||||||
#ifdef HAVE_QT
|
#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();
|
ui_companion_qt_data = ui_companion_qt.init();
|
||||||
qt_is_inited = true;
|
qt_is_inited = true;
|
||||||
@ -159,8 +159,16 @@ void ui_companion_driver_toggle(bool force)
|
|||||||
|
|
||||||
#ifdef HAVE_QT
|
#ifdef HAVE_QT
|
||||||
if (settings->bools.desktop_menu_enable)
|
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);
|
ui_companion_qt.toggle(ui_companion_qt_data, force);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user