mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Fixed the crash that would occur when the Refresh button was pressed in the controllers config.
- Simplified the locking mechanism when controllers were updated - Reloaded the config of the controls instead of re-initialising the control plugins - Fixed controls being unresponsive after the Refresh button was pressed - Disables the hotkeys while the controller config is open
This commit is contained in:
@ -55,6 +55,12 @@ void Initialize(void* const hwnd, bool wait)
|
||||
Movie::ChangeWiiPads();
|
||||
}
|
||||
|
||||
void LoadConfig()
|
||||
{
|
||||
s_config.LoadConfig(true);
|
||||
}
|
||||
|
||||
|
||||
void Resume()
|
||||
{
|
||||
WiimoteReal::Resume();
|
||||
@ -113,7 +119,7 @@ void Update(int _number)
|
||||
//PanicAlert( "Wiimote_Update" );
|
||||
|
||||
// TODO: change this to a try_to_lock, and make it give empty input on failure
|
||||
std::lock_guard<std::recursive_mutex> lk(s_config.controls_lock);
|
||||
std::unique_lock<std::recursive_mutex> lk(s_config.controls_lock, std::try_to_lock);
|
||||
|
||||
if (WIIMOTE_SRC_EMU & g_wiimote_sources[_number])
|
||||
((WiimoteEmu::Wiimote*)s_config.controllers[_number])->Update();
|
||||
|
Reference in New Issue
Block a user