dolphin/Source/Core
Filoppi 83ea16f402 Qt: Fix IOWindow keeping a shared ptr to devices even after them being removed by the ControllerInterface
this prevented some devices from being recreated correctly, as they were exclusive (e.g. DInput Joysticks)

This is achieved by calling Settings::ReleaseDevices(), which releases all the UI devices shared ptrs.
If we are the host (Qt) thread, DevicesChanged() is now called in line, to avoid devices being hanged onto by the UI.
For this, I had to add a method to check whether we are the Host Thread to Qt.

Avoid calling ControllerInterface::RefreshDevices() from the CPU thread if the emulation is running
and we manually refresh devices from Qt, as that is not necessary anymore.

Refactored the way IOWindow lists devices to make it clearer and hold onto disconnected devices.
There were so many issues with the previous code:
-Devices changes would not be reflected until the window was re-opened
-If there was no default device, it would fail to select the device at index 0
-It could have crashed if we had 0 devices
-The default device was not highlighted as such
2021-06-07 11:48:30 +03:00
..
AudioCommon Replace uses of cassert with Common/Assert.h 2021-04-02 10:18:18 -07:00
Common ControllerInterface: DInput Joystick fix non thread safe static variable 2021-06-07 11:07:06 +03:00
Core ControllerInterface: make real Wiimote use PlatformPopulateDevices() 2021-06-07 11:07:06 +03:00
DiscIO DiscIO: Use MathUtil::SaturatingCast 2021-04-06 23:27:23 +02:00
DolphinNoGUI Implement Cursor Locking and new input focus checks for it 2021-05-27 10:31:12 +03:00
DolphinQt Qt: Fix IOWindow keeping a shared ptr to devices even after them being removed by the ControllerInterface 2021-06-07 11:48:30 +03:00
InputCommon InputCommon: Make Wiimote rumble variable thread safe 2021-06-07 11:48:30 +03:00
MacUpdater Apple M1: Build, Analytics, and Memory Management 2021-05-22 15:25:17 -07:00
UICommon Updater: Escape HTML characters in commit descriptions 2021-06-01 17:22:19 -07:00
UpdaterCommon Updater: Add code documentation Markdown file 2021-04-13 15:37:31 -07:00
VideoBackends VideoCommon: Restore BBox* forwarding functions 2021-05-31 18:01:47 -04:00
VideoCommon VideoCommon: Round bounding box coordinates down and remove pixel center offset 2021-06-05 00:34:10 -04:00
WinUpdater Updater: Add code documentation Markdown file 2021-04-13 15:37:31 -07:00
CMakeLists.txt WinUpdater: Add CMakeLists.txt 2019-05-08 23:59:04 +02:00
DolphinLib.ARM64.props Implement ArmFPURoundMode.cpp 2021-04-25 15:56:19 +02:00
DolphinLib.props Merge pull request #9707 from JosJuice/remove-atomic-header 2021-05-14 14:33:24 -04:00
DolphinLib.vcxproj JitCommon: Signed 32-bit division magic constants 2021-03-07 18:27:36 +01:00
DolphinLib.vcxproj.user msbuild: bundle all dolphin "core" code into single library 2021-01-27 14:29:49 -08:00
DolphinLib.x64.props msbuild: bundle all dolphin "core" code into single library 2021-01-27 14:29:49 -08:00