dolphin/Source/Core/DolphinQt
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
..
Config 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
Debugger
FIFO
GameList
NetPlay
QtUtils
Settings Implement Cursor Locking and new input focus checks for it 2021-05-27 10:31:12 +03:00
TAS
AboutDialog.cpp
AboutDialog.h
CheatsManager.cpp CheatsManager: Use game information directly from SConfig, and only recreate widgets if game changes. 2021-06-06 21:56:34 +02:00
CheatsManager.h CheatsManager: Use game information directly from SConfig, and only recreate widgets if game changes. 2021-06-06 21:56:34 +02:00
CMakeLists.txt Apple M1: Enable hardened runtime 2021-05-22 15:25:18 -07:00
ConvertDialog.cpp
ConvertDialog.h
DiscordHandler.cpp
DiscordHandler.h
DiscordJoinRequestDialog.cpp
DiscordJoinRequestDialog.h
DolphinEmu.entitlements Apple M1: Build, Analytics, and Memory Management 2021-05-22 15:25:17 -07:00
DolphinQt.manifest
DolphinQt.rc
DolphinQt.vcxproj
DolphinQt.vcxproj.user
GCMemcardCreateNewDialog.cpp
GCMemcardCreateNewDialog.h
GCMemcardManager.cpp
GCMemcardManager.h
Host.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
Host.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
HotkeyScheduler.cpp Implement Cursor Locking and new input focus checks for it 2021-05-27 10:31:12 +03:00
HotkeyScheduler.h Implement Cursor Locking and new input focus checks for it 2021-05-27 10:31:12 +03:00
Info.plist.in
Main.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
MainWindow.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
MainWindow.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
MenuBar.cpp
MenuBar.h
NKitWarningDialog.cpp
NKitWarningDialog.h
qt.conf
qt.conf.win
RenderWidget.cpp Implement Cursor Locking and new input focus checks for it 2021-05-27 10:31:12 +03:00
RenderWidget.h Implement Cursor Locking and new input focus checks for it 2021-05-27 10:31:12 +03:00
resource.h
ResourcePackManager.cpp
ResourcePackManager.h
Resources.cpp
Resources.h
SearchBar.cpp
SearchBar.h
Settings.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
Settings.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
ToolBar.cpp
ToolBar.h
Translation.cpp
Translation.h
Updater.cpp
Updater.h
WiiUpdate.cpp
WiiUpdate.h