mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
Qt: only check for pending events of the main thread
This commit is contained in:
parent
ec8f40c833
commit
c2ad8d47d3
@ -15,6 +15,7 @@
|
||||
*/
|
||||
|
||||
#include <QApplication>
|
||||
#include <QAbstractEventDispatcher>
|
||||
|
||||
extern "C" {
|
||||
#include "../../ui_companion_driver.h"
|
||||
@ -144,13 +145,18 @@ static void* ui_application_qt_initialize(void)
|
||||
|
||||
static bool ui_application_qt_pending_events(void)
|
||||
{
|
||||
return QApplication::hasPendingEvents();
|
||||
QAbstractEventDispatcher *dispatcher = QApplication::eventDispatcher();
|
||||
|
||||
if (dispatcher)
|
||||
return dispatcher->hasPendingEvents();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static void ui_application_qt_process_events(void)
|
||||
{
|
||||
if(ui_application_qt_pending_events())
|
||||
QApplication::processEvents();
|
||||
if (ui_application_qt_pending_events())
|
||||
QApplication::processEvents();
|
||||
}
|
||||
|
||||
static void ui_application_qt_quit(void)
|
||||
|
Loading…
x
Reference in New Issue
Block a user