mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 03:32:46 +00:00
(Win32) Implement application process events
This commit is contained in:
parent
ba962d5dda
commit
f4c3a41f84
@ -537,13 +537,9 @@ void win32_show_cursor(bool state)
|
||||
void win32_check_window(bool *quit, bool *resize, unsigned *width, unsigned *height)
|
||||
{
|
||||
#ifndef _XBOX
|
||||
MSG msg;
|
||||
|
||||
while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
|
||||
{
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
const ui_application_t *application = ui_companion_driver_get_application_ptr();
|
||||
if (application)
|
||||
application->process_events();
|
||||
#endif
|
||||
*quit = g_quit;
|
||||
|
||||
|
@ -63,9 +63,9 @@ static INLINE int compat_ctz(unsigned x)
|
||||
#elif _MSC_VER >= 1400
|
||||
static INLINE int compat_ctz(unsigned x)
|
||||
{
|
||||
int r = 0;
|
||||
_BitScanReverse(&r, x);
|
||||
return r;
|
||||
unsigned long r = 0;
|
||||
_BitScanReverse((unsigned long*)&r, x);
|
||||
return (int)r;
|
||||
}
|
||||
#else
|
||||
/* Only checks at nibble granularity,
|
||||
|
@ -18,7 +18,12 @@
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <direct.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <errno.h>
|
||||
|
||||
#include <lists/string_list.h>
|
||||
|
@ -19,10 +19,24 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include "../../ui_companion_driver.h"
|
||||
|
||||
static void ui_application_win32_process_events(void)
|
||||
{
|
||||
MSG msg;
|
||||
|
||||
while (PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE))
|
||||
{
|
||||
MSG msg2;
|
||||
|
||||
if (PeekMessage(&msg2, 0, 0, 0, PM_REMOVE))
|
||||
{
|
||||
TranslateMessage(&msg2);
|
||||
DispatchMessage (&msg2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const ui_application_t ui_application_win32 = {
|
||||
|
@ -20,6 +20,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma comment( lib, "comctl32" )
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user