ControllerInterface: Add a way to register callbacks

This adds RegisterHotplugCallback() to register a callback which will
be invoked by the input backends' hotplug threads when there is a new
device, so that Core (GCKeyboard, GCPad, Wiimote, Hotkey) can reload
the configuration without adding a dependency to Core from InputCommon.
This commit is contained in:
Léo Lam 2016-06-13 11:11:47 +02:00
parent 2304d76914
commit 0d783f0869
6 changed files with 30 additions and 0 deletions

View file

@ -186,6 +186,7 @@ void Initialize(void* const hwnd)
s_config.CreateController<HotkeyManager>();
g_controller_interface.Initialize(hwnd);
g_controller_interface.RegisterHotplugCallback(LoadConfig);
// load the saved controller config
s_config.LoadConfig(true);