diff --git a/src/emu/machine.cpp b/src/emu/machine.cpp index 8c0bdfb38bee7..833b445b6d717 100644 --- a/src/emu/machine.cpp +++ b/src/emu/machine.cpp @@ -1449,6 +1449,11 @@ void running_machine::retro_machineexit(){ void running_machine::retro_loop(){ + // get most recent input now + m_manager.osd().input_update(); + // perform tasks for this frame + call_notifiers(MACHINE_NOTIFY_FRAME); + while (RLOOP==1) { // execute CPUs if not paused diff --git a/src/emu/video.cpp b/src/emu/video.cpp index b6dada1c0b5c5..0908a93a3ba35 100644 --- a/src/emu/video.cpp +++ b/src/emu/video.cpp @@ -243,15 +243,19 @@ void video_manager::frame_update(bool from_debugger) if (!from_debugger && !skipped_it && phase > machine_phase::INIT && m_low_latency && effective_throttle()) update_throttle(current_time); +#if !defined(__LIBRETRO__) // get most recent input now machine().osd().input_update(); +#endif emulator_info::periodic_check(); if (!from_debugger) { +#if !defined(__LIBRETRO__) // perform tasks for this frame machine().call_notifiers(MACHINE_NOTIFY_FRAME); +#endif // update frameskipping if (phase > machine_phase::INIT) diff --git a/src/osd/libretro/video.cpp b/src/osd/libretro/video.cpp index 425cdbac37e6c..22b698cec8dcd 100644 --- a/src/osd/libretro/video.cpp +++ b/src/osd/libretro/video.cpp @@ -120,6 +120,8 @@ void retro_osd_interface::update(bool skip_redraw) // if we're running, disable some parts of the debugger if ((machine().debug_flags & DEBUG_FLAG_OSD_ENABLED) != 0) debugger_update(); + + RLOOP=0; } //============================================================ @@ -131,8 +133,6 @@ void retro_osd_interface::input_update() process_events_buf(); poll_inputs(machine()); check_osd_inputs(machine()); - - RLOOP=0; } //============================================================