diff --git a/frontend/frontend.c b/frontend/frontend.c index 0f5da34241..4d83c9a52d 100644 --- a/frontend/frontend.c +++ b/frontend/frontend.c @@ -322,13 +322,18 @@ int rarch_main(int argc, char *argv[], void *data) } #ifndef HAVE_MAIN - do{ + do + { + bool sleeping = false; unsigned sleep_ms = 0; ret = rarch_main_iterate(&sleep_ms); if (ret == 1 && sleep_ms > 0) + { + sleeping = true; retro_sleep(sleep_ms); - rarch_main_data_iterate(); + } + rarch_main_data_iterate(sleeping); }while(ret != -1); main_exit(args); diff --git a/runloop.h b/runloop.h index 7c16221d3e..4c8ddcf242 100644 --- a/runloop.h +++ b/runloop.h @@ -17,7 +17,9 @@ #define __RETROARCH_RUNLOOP_H #include + #include + #include "libretro.h" #include "core_info.h" #include "core_options.h" diff --git a/runloop_data.h b/runloop_data.h index 92c63d9b37..86346ec242 100644 --- a/runloop_data.h +++ b/runloop_data.h @@ -16,6 +16,7 @@ #ifndef __RETROARCH_DATA_RUNLOOP_H #define __RETROARCH_DATA_RUNLOOP_H +#include #include #ifdef __cplusplus