mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-27 18:20:27 +00:00
(Win32) Reimplement PeekMessage implementation - this should be at the
start of the while loop
This commit is contained in:
parent
0a4bc116df
commit
e02ff9c40c
@ -146,8 +146,12 @@ int rarch_main(int argc, char *argv[], void *data)
|
||||
#if !defined(HAVE_MAIN)
|
||||
do
|
||||
{
|
||||
int ret;
|
||||
unsigned sleep_ms = 0;
|
||||
int ret = runloop_iterate(&sleep_ms);
|
||||
#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
|
||||
ui_companion_win32.application->process_events();
|
||||
#endif
|
||||
ret = runloop_iterate(&sleep_ms);
|
||||
|
||||
if (ret == 1 && sleep_ms > 0)
|
||||
retro_sleep(sleep_ms);
|
||||
@ -170,6 +174,9 @@ int rarch_main(int argc, char *argv[], void *data)
|
||||
int ret;
|
||||
unsigned sleep_ms = 0;
|
||||
|
||||
#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
|
||||
ui_companion_win32.application->process_events();
|
||||
#endif
|
||||
if (ui_application->process_events)
|
||||
ui_application->process_events();
|
||||
|
||||
|
@ -1132,14 +1132,7 @@ void win32_check_window(bool *quit, bool *resize,
|
||||
unsigned *width, unsigned *height)
|
||||
{
|
||||
#if !defined(_XBOX)
|
||||
if (video_driver_is_threaded())
|
||||
{
|
||||
const ui_application_t *application =
|
||||
ui_companion_driver_get_application_ptr();
|
||||
if (application)
|
||||
application->process_events();
|
||||
}
|
||||
*quit = g_win32_quit;
|
||||
*quit = g_win32_quit;
|
||||
|
||||
if (g_win32_resized)
|
||||
{
|
||||
|
@ -36,7 +36,8 @@ static bool ui_application_win32_pending_events(void)
|
||||
|
||||
static void ui_application_win32_process_events(void)
|
||||
{
|
||||
while (ui_application_win32_pending_events())
|
||||
MSG msg;
|
||||
while (PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE))
|
||||
{
|
||||
MSG msg;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user