dolphin/Source/Core/DolphinQt
Filoppi 1badceb455 ControllerInterface: fix UpdateReferences() deadlock
Removed useless locks to DeviceContainer::m_devices_mutex, as they were all already protected by m_devices_population_mutex.
We have no interest in blocking other threads that were potentially reading devices at the same time so this seems fine.
This simplifies the code, and I've adjusted a few comments which mentioned possible deadlock that should now be totally gone.

The deadlock could have happen if a thread directly called EmulatedController::UpdateReferences(), while another another thread also reached EmulatedController::UpdateReferences() within a call to ControllerInterface::UpdateDevices(), as the mentioned function locked both the DeviceContainer::m_devices_mutex and s_get_state_mutex at the same time.

The deadlock was frequent on game emulation startup on Android, due to the UpdateReferences() call in InputConfig::LoadConfig() and the UI thread triggering calls to ControllerInterface::UpdateDevices().
It could also have happened on Desktop if a user pressed "Refresh Devices" manually in the UI while the input config was loading.

Also brought some UpdateReferences() comments and thread safety fixes from https://github.com/dolphin-emu/dolphin/pull/9489
2021-11-20 16:54:36 +02:00
..
Config Convert LOG_TYPE and LOG_LEVELS to enum class 2021-10-24 11:48:36 -07:00
Debugger Fix all uninitialized variable warnings (C26495) 2021-10-13 12:32:16 -07:00
FIFO Add wrapper function to disable hotkeys for QFileDialog 2021-10-09 22:43:56 -04:00
GameList DolphinQt, VideoBackends: Fix all cases of -Wswitch in gcc 11 2021-11-02 13:50:21 +01:00
NetPlay
QtUtils DolphinQt: Fix a -Wunused-result in gcc 11 2021-11-02 13:50:21 +01:00
Settings Core, DolphinQt, UICommon: Fix all cases of -Wrange-loop-construct in gcc 11 2021-11-02 13:50:21 +01:00
TAS Fix all uninitialized variable warnings (C26495) 2021-10-13 12:32:16 -07:00
AboutDialog.cpp
AboutDialog.h
CheatSearchFactoryWidget.cpp Qt/CheatSearchFactoryWidget: Refuse to start standard memory region searches when no game is running because the memory size and console type may not be accurate. 2021-10-28 01:59:52 +02:00
CheatSearchFactoryWidget.h
CheatSearchWidget.cpp Qt/CheatSearchWidget: Add a checkbox to force parsing a value as hexadecimal. 2021-10-28 02:00:38 +02:00
CheatSearchWidget.h Qt/CheatSearchWidget: Add a checkbox to force parsing a value as hexadecimal. 2021-10-28 02:00:38 +02:00
CheatsManager.cpp Qt/CheatsManager: Save and restory geometry. 2021-10-28 01:03:30 +02:00
CheatsManager.h
CMakeLists.txt MoltenVK: Use an external project instead of a pre-compiled dylib 2021-11-13 11:43:23 -08:00
ConvertDialog.cpp Add wrapper function to disable hotkeys for QFileDialog 2021-10-09 22:43:56 -04:00
ConvertDialog.h
DiscordHandler.cpp
DiscordHandler.h
DiscordJoinRequestDialog.cpp
DiscordJoinRequestDialog.h
DolphinEmu.entitlements
DolphinEmuDebug.entitlements
DolphinQt.manifest
DolphinQt.rc
DolphinQt.vcxproj msbuild: use /external:anglebrackets 2021-11-15 00:33:51 -08:00
DolphinQt.vcxproj.user
GBAHost.cpp
GBAHost.h
GBAWidget.cpp Add wrapper function to disable hotkeys for QFileDialog 2021-10-09 22:43:56 -04:00
GBAWidget.h
GCMemcardCreateNewDialog.cpp Add wrapper function to disable hotkeys for QFileDialog 2021-10-09 22:43:56 -04:00
GCMemcardCreateNewDialog.h
GCMemcardManager.cpp Add wrapper function to disable hotkeys for QFileDialog 2021-10-09 22:43:56 -04:00
GCMemcardManager.h
Host.cpp
Host.h
HotkeyScheduler.cpp Merge pull request #10171 from malleoz/fix-frame-advance-speed 2021-10-16 11:36:07 +02:00
HotkeyScheduler.h HotkeyScheduler: add PlayRecording hotkey support 2021-09-24 11:58:41 -04:00
Info.plist.in
Main.cpp
MainWindow.cpp Core: Deduplicate Riivolution Patch to BootParameters apply logic. 2021-10-24 00:09:08 +02:00
MainWindow.h DolphinQt: Add ability to start a game with Riivolution patches from the GUI. 2021-10-24 00:09:06 +02:00
MenuBar.cpp Port Main.DSP to MainSettings 2021-10-15 23:24:46 -04:00
MenuBar.h
NKitWarningDialog.cpp
NKitWarningDialog.h
qt.conf
qt.conf.win
RenderWidget.cpp RenderWidget: Change "imgui.h" to <imgui.h> 2021-10-29 12:05:21 -07:00
RenderWidget.h Add option for Never Hide Mouse Cursor 2021-10-12 21:04:27 -04:00
resource.h
ResourcePackManager.cpp
ResourcePackManager.h
Resources.cpp Core, DolphinQt, UICommon: Fix all cases of -Wrange-loop-construct in gcc 11 2021-11-02 13:50:21 +01:00
Resources.h Core, DolphinQt, UICommon: Fix all cases of -Wrange-loop-construct in gcc 11 2021-11-02 13:50:21 +01:00
RiivolutionBootWidget.cpp DolphinQt: Act like Riivolution and pre-select the last selected patch options when launching via the RiivolutionBootWidget. 2021-10-24 00:09:08 +02:00
RiivolutionBootWidget.h DolphinQt: Act like Riivolution and pre-select the last selected patch options when launching via the RiivolutionBootWidget. 2021-10-24 00:09:08 +02:00
SearchBar.cpp
SearchBar.h
Settings.cpp ControllerInterface: fix UpdateReferences() deadlock 2021-11-20 16:54:36 +02:00
Settings.h Add option for Never Hide Mouse Cursor 2021-10-12 21:04:27 -04:00
ToolBar.cpp
ToolBar.h
Translation.cpp
Translation.h
Updater.cpp
Updater.h
WiiUpdate.cpp
WiiUpdate.h