diff --git a/core/hw/maple/maple_if.cpp b/core/hw/maple/maple_if.cpp index 4d078a20e..9ad81cdbc 100644 --- a/core/hw/maple/maple_if.cpp +++ b/core/hw/maple/maple_if.cpp @@ -19,7 +19,6 @@ maple_device* MapleDevices[MAPLE_PORTS][6]; int maple_schid; -void UpdateInputState(); /* Maple host controller Direct processing, async interrupt handling @@ -147,8 +146,6 @@ static void maple_DoDma() } #endif - UpdateInputState(); - const bool swap_msb = (SB_MMSEL == 0); u32 xfer_count=0; bool last = false; diff --git a/core/rend/gui.cpp b/core/rend/gui.cpp index e7cc7a608..2c2b1edcf 100644 --- a/core/rend/gui.cpp +++ b/core/rend/gui.cpp @@ -41,7 +41,6 @@ #include "emulator.h" #include "rend/mainui.h" -extern void UpdateInputState(); static bool game_started; extern u8 kb_shift[MAPLE_PORTS]; // shift keys pressed (bitmask) @@ -310,8 +309,6 @@ static void ImGui_Impl_NewFrame() ImGuiIO& io = ImGui::GetIO(); - UpdateInputState(); - // Read keyboard modifiers inputs io.KeyCtrl = 0; io.KeyShift = 0; diff --git a/core/rend/mainui.cpp b/core/rend/mainui.cpp index b155a520e..9ecbb6e8e 100644 --- a/core/rend/mainui.cpp +++ b/core/rend/mainui.cpp @@ -35,6 +35,7 @@ void UpdateInputState(); bool mainui_rend_frame() { os_DoEvents(); + UpdateInputState(); if (gui_is_open() || gui_state == GuiState::VJoyEdit) { @@ -48,7 +49,6 @@ bool mainui_rend_frame() { if (!rend_single_frame(mainui_enabled)) { - UpdateInputState(); if (!dc_is_running()) { std::string error = dc_get_last_error(); diff --git a/shell/libretro/libretro.cpp b/shell/libretro/libretro.cpp index 40aee9ef9..790d82217 100644 --- a/shell/libretro/libretro.cpp +++ b/shell/libretro/libretro.cpp @@ -173,6 +173,8 @@ static std::vector disk_paths; static std::vector disk_labels; static bool disc_tray_open = false; +void UpdateInputState(); + void retro_set_video_refresh(retro_video_refresh_t cb) { video_cb = cb; @@ -827,6 +829,9 @@ void retro_run() if (config::RendererType.isOpenGL()) glsm_ctl(GLSM_CTL_STATE_BIND, nullptr); + poll_cb(); + UpdateInputState(); + if (config::ThreadedRendering) { bool fastforward = false; @@ -840,8 +845,6 @@ void retro_run() first_run = false; } - poll_cb(); - // Render is_dupe = true; for (int i = 0; i < 5 && is_dupe; i++)