dolphin/Source/Core/DolphinQt/Config/Mapping
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
..
FreeLookGeneral.cpp
FreeLookGeneral.h
FreeLookRotation.cpp DolphinQt: Add separate Free Look tab for rotation 2021-03-17 20:58:33 -05:00
FreeLookRotation.h DolphinQt: Add separate Free Look tab for rotation 2021-03-17 20:58:33 -05:00
GCKeyboardEmu.cpp
GCKeyboardEmu.h
GCMicrophone.cpp
GCMicrophone.h
GCPadEmu.cpp
GCPadEmu.h
GCPadWiiUConfigDialog.cpp
GCPadWiiUConfigDialog.h
Hotkey3D.cpp
Hotkey3D.h
HotkeyControllerProfile.cpp
HotkeyControllerProfile.h
HotkeyDebugging.cpp
HotkeyDebugging.h
HotkeyGeneral.cpp
HotkeyGeneral.h
HotkeyGraphics.cpp
HotkeyGraphics.h
HotkeyStates.cpp
HotkeyStates.h
HotkeyStatesOther.cpp
HotkeyStatesOther.h
HotkeyTAS.cpp
HotkeyTAS.h
HotkeyWii.cpp
HotkeyWii.h
IOWindow.cpp 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
IOWindow.h 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
MappingButton.cpp Qt: simplify the preview of control mappings/expressions by removing their device path 2021-05-11 12:20:37 +03:00
MappingButton.h
MappingCommon.cpp This removes a delay for input mapping. 2021-05-02 15:27:11 -04:00
MappingCommon.h rename InputCommon/ControllerInterface/Device to CoreDevice 2021-01-27 14:29:48 -08:00
MappingIndicator.cpp rename InputCommon/ControllerInterface/Device to CoreDevice 2021-01-27 14:29:48 -08:00
MappingIndicator.h
MappingNumeric.cpp Qt: add tooltip to MappingBool 2021-05-12 18:27:24 +03:00
MappingNumeric.h
MappingWidget.cpp
MappingWidget.h
MappingWindow.cpp 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
MappingWindow.h rename InputCommon/ControllerInterface/Device to CoreDevice 2021-01-27 14:29:48 -08:00
WiimoteEmuExtension.cpp
WiimoteEmuExtension.h
WiimoteEmuExtensionMotionInput.cpp
WiimoteEmuExtensionMotionInput.h
WiimoteEmuExtensionMotionSimulation.cpp
WiimoteEmuExtensionMotionSimulation.h
WiimoteEmuGeneral.cpp
WiimoteEmuGeneral.h
WiimoteEmuMotionControl.cpp
WiimoteEmuMotionControl.h
WiimoteEmuMotionControlIMU.cpp
WiimoteEmuMotionControlIMU.h