From 80a12ca102d26a4fc1f80de6aadf4340fefebce1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sat, 6 Apr 2024 12:18:28 +0200 Subject: [PATCH] Run the update menu item thing on the window thread too. --- Core/RetroAchievements.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Core/RetroAchievements.cpp b/Core/RetroAchievements.cpp index d97d9427ba45..5b85f080751d 100644 --- a/Core/RetroAchievements.cpp +++ b/Core/RetroAchievements.cpp @@ -499,7 +499,10 @@ static void raintegration_event_handler(const rc_client_raintegration_event_t *e case RC_CLIENT_RAINTEGRATION_EVENT_MENUITEM_CHECKED_CHANGED: // The checked state of one of the menu items has changed and should be reflected in the UI. // Call the handy helper function if the menu was created by rc_client_raintegration_rebuild_submenu. - rc_client_raintegration_update_menu_item(client, event->menu_item); + System_RunCallbackInWndProc([](void *vhWnd, void *userdata) { + auto menuItem = reinterpret_cast(userdata); + rc_client_raintegration_update_menu_item(g_rcClient, menuItem); + }, reinterpret_cast(reinterpret_cast(event->menu_item))); break; case RC_CLIENT_RAINTEGRATION_EVENT_PAUSE: // The toolkit has hit a breakpoint and wants to pause the emulator. Do so.