Emulator Issues #12460
Devices need to be manually refreshed after closing a game if some mapping widgets were open
What's the problem? Describe what went wrong.
Devices need to be manually refreshed after closing a game if some mapping widgets were open.
What steps will reproduce the problem?
Steps to reproduce the bug:
-Start a game
-Stop the game (set the emulation speed multiplier to 40% to have more time)
-Quickly Open a IOWindow with a DInput device selected in it (either KeyboardMouse or Joystick/Controller).
-Repopulation will "fail", the DInput device won't be recreated until manually refreshing (it will show as [disconnected]).
Is the issue present in the latest development version? For future reference, please also write down the version number of the latest development version.
I haven't tested very old versions: it's probably been broken since Qt was introduced.
But I know exactly why it's happen, the UI keeps a shared ptr to the device, preventing its destruction which prevents the creation of a new one.
I have fixed it and will make a PR soon.