mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
(UI application) We don't use pending_events - get rid of it
This commit is contained in:
parent
13bfb9710b
commit
801b0742d8
@ -29,14 +29,6 @@ static void* ui_application_cocoa_initialize(void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static bool ui_application_cocoa_pending_events(void)
|
||||
{
|
||||
NSEvent *event = [NSApp nextEventMatchingMask:NSEventMaskAny untilDate:[NSDate distantPast] inMode:NSDefaultRunLoopMode dequeue:YES];
|
||||
if (!event)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void ui_application_cocoa_process_events(void)
|
||||
{
|
||||
while (1)
|
||||
@ -56,7 +48,6 @@ static void ui_application_cocoa_process_events(void)
|
||||
|
||||
ui_application_t ui_application_cocoa = {
|
||||
ui_application_cocoa_initialize,
|
||||
ui_application_cocoa_pending_events,
|
||||
ui_application_cocoa_process_events,
|
||||
NULL,
|
||||
false,
|
||||
|
@ -128,19 +128,10 @@ static void* ui_application_qt_initialize(void)
|
||||
return &ui_application;
|
||||
}
|
||||
|
||||
static bool ui_application_qt_pending_events(void)
|
||||
{
|
||||
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())
|
||||
QAbstractEventDispatcher *dispatcher = QApplication::eventDispatcher();
|
||||
if (dispatcher && dispatcher->hasPendingEvents())
|
||||
QApplication::processEvents();
|
||||
}
|
||||
|
||||
@ -162,7 +153,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
ui_application_t ui_application_qt = {
|
||||
ui_application_qt_initialize,
|
||||
ui_application_qt_pending_events,
|
||||
ui_application_qt_process_events,
|
||||
ui_application_qt_quit,
|
||||
false,
|
||||
|
@ -28,12 +28,6 @@ static void* ui_application_win32_initialize(void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static bool ui_application_win32_pending_events(void)
|
||||
{
|
||||
MSG msg;
|
||||
return PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE);
|
||||
}
|
||||
|
||||
static void ui_application_win32_process_events(void)
|
||||
{
|
||||
MSG msg;
|
||||
@ -46,7 +40,6 @@ static void ui_application_win32_process_events(void)
|
||||
|
||||
ui_application_t ui_application_win32 = {
|
||||
ui_application_win32_initialize,
|
||||
ui_application_win32_pending_events,
|
||||
ui_application_win32_process_events,
|
||||
NULL,
|
||||
false,
|
||||
|
@ -105,7 +105,6 @@ typedef struct ui_msg_window
|
||||
typedef struct ui_application
|
||||
{
|
||||
void* (*initialize)(void);
|
||||
bool (*pending_events)(void);
|
||||
void (*process_events)(void);
|
||||
void (*quit)(void);
|
||||
bool exiting;
|
||||
|
Loading…
x
Reference in New Issue
Block a user