mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-03 17:02:41 +00:00
ControllerInterface: Allow hotplug callbacks to be unregistered and don't reload the entire config from the ini file on hotplug, just update the control references. This should fix a crash on shutdown on Android.
This commit is contained in:
parent
c2afcb0f6b
commit
b425f86121
10 changed files with 62 additions and 16 deletions
|
@ -238,7 +238,7 @@ void Initialize()
|
|||
if (s_config.ControllersNeedToBeCreated())
|
||||
s_config.CreateController<HotkeyManager>();
|
||||
|
||||
g_controller_interface.RegisterDevicesChangedCallback(LoadConfig);
|
||||
s_config.RegisterHotplugCallback();
|
||||
|
||||
// load the saved controller config
|
||||
s_config.LoadConfig(true);
|
||||
|
@ -260,9 +260,11 @@ ControllerEmu::ControlGroup* GetHotkeyGroup(HotkeyGroup group)
|
|||
|
||||
void Shutdown()
|
||||
{
|
||||
s_config.UnregisterHotplugCallback();
|
||||
|
||||
s_config.ClearControllers();
|
||||
}
|
||||
}
|
||||
} // namespace HotkeyManagerEmu
|
||||
|
||||
struct HotkeyGroupInfo
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue