InputCommon: Make ControllerInterface RegisterDevicesChangedCallback use Common::HookableEvent.

This commit is contained in:
Jordan Woyak committed 2025-11-05 17:12:56 -06:00
1 parent 2170080f53
commit ca6d8e1f0b
7 files changed
+27 -36

No files matched your search

@@ -454,8 +454,8 @@ void RegisterDevicesChangedCallbackIfNeeded(JNIEnv* env, jclass controller_inter
const jmethodID controller_interface_on_devices_changed =
env->GetStaticMethodID(global_controller_interface_class, "onDevicesChanged", "()V");
g_controller_interface.RegisterDevicesChangedCallback(
[global_controller_interface_class, controller_interface_on_devices_changed] {
static Common::EventHook event_hook = g_controller_interface.RegisterDevicesChangedCallback(
"Android", [global_controller_interface_class, controller_interface_on_devices_changed] {
IDCache::GetEnvForThread()->CallStaticVoidMethod(global_controller_interface_class,
controller_interface_on_devices_changed);
});