mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-11 16:49:28 +02:00
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:
@ -127,7 +127,11 @@ public:
|
||||
const ciface::Core::DeviceQualifier& default_device) const;
|
||||
void UpdateInput();
|
||||
|
||||
void RegisterHotplugCallback(std::function<void(void)> callback);
|
||||
void InvokeHotplugCallbacks() const;
|
||||
|
||||
private:
|
||||
std::vector<std::function<void()>> m_hotplug_callbacks;
|
||||
bool m_is_init;
|
||||
void* m_hwnd;
|
||||
};
|
||||
|
Reference in New Issue
Block a user