mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
Common: Remove the string parameters from the HookableEvent interface.
This commit is contained in:
@@ -455,7 +455,7 @@ void RegisterDevicesChangedCallbackIfNeeded(JNIEnv* env, jclass controller_inter
|
||||
env->GetStaticMethodID(global_controller_interface_class, "onDevicesChanged", "()V");
|
||||
|
||||
static Common::EventHook event_hook = g_controller_interface.RegisterDevicesChangedCallback(
|
||||
"Android", [global_controller_interface_class, controller_interface_on_devices_changed] {
|
||||
[global_controller_interface_class, controller_interface_on_devices_changed] {
|
||||
IDCache::GetEnvForThread()->CallStaticVoidMethod(global_controller_interface_class,
|
||||
controller_interface_on_devices_changed);
|
||||
});
|
||||
|
||||
@@ -415,10 +415,9 @@ bool ControllerInterface::IsMouseCenteringRequested() const
|
||||
// Returns a handle for later removing the callback.
|
||||
|
||||
Common::EventHook
|
||||
ControllerInterface::RegisterDevicesChangedCallback(std::string_view name,
|
||||
Common::HookableEvent<>::CallbackType callback)
|
||||
ControllerInterface::RegisterDevicesChangedCallback(Common::HookableEvent<>::CallbackType callback)
|
||||
{
|
||||
return m_devices_changed_event.Register(std::move(callback), name);
|
||||
return m_devices_changed_event.Register(std::move(callback));
|
||||
}
|
||||
|
||||
// Invoke all callbacks that were registered
|
||||
|
||||
@@ -115,8 +115,7 @@ public:
|
||||
bool IsMouseCenteringRequested() const;
|
||||
|
||||
[[nodiscard]] Common::EventHook
|
||||
RegisterDevicesChangedCallback(std::string_view name,
|
||||
Common::HookableEvent<>::CallbackType callback);
|
||||
RegisterDevicesChangedCallback(Common::HookableEvent<>::CallbackType callback);
|
||||
|
||||
static void SetCurrentInputChannel(ciface::InputChannel);
|
||||
static ciface::InputChannel GetCurrentInputChannel();
|
||||
@@ -128,7 +127,7 @@ private:
|
||||
|
||||
void InvokeDevicesChangedCallbacks();
|
||||
|
||||
Common::HookableEvent<> m_devices_changed_event{"Devices Changed"};
|
||||
Common::HookableEvent<> m_devices_changed_event;
|
||||
|
||||
mutable std::recursive_mutex m_devices_population_mutex;
|
||||
std::atomic<bool> m_is_init;
|
||||
|
||||
Reference in New Issue
Block a user