mirror of
https://github.com/libretro/RetroArch
synced 2025-04-11 00:44:20 +00:00
Qt: only check for pending events of the main thread
This commit is contained in:
parent
8e7e530747
commit
d55b1a0ad4
@ -15,6 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
#include <QAbstractEventDispatcher>
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "../../ui_companion_driver.h"
|
#include "../../ui_companion_driver.h"
|
||||||
@ -144,13 +145,18 @@ static void* ui_application_qt_initialize(void)
|
|||||||
|
|
||||||
static bool ui_application_qt_pending_events(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)
|
static void ui_application_qt_process_events(void)
|
||||||
{
|
{
|
||||||
if(ui_application_qt_pending_events())
|
if (ui_application_qt_pending_events())
|
||||||
QApplication::processEvents();
|
QApplication::processEvents();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ui_application_qt_quit(void)
|
static void ui_application_qt_quit(void)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user