From a0d62895825de30db1b28ce83c9e3bdbcc71edeb Mon Sep 17 00:00:00 2001 From: Narr the Reg Date: Thu, 23 Nov 2023 12:39:22 -0500 Subject: [PATCH] android: unload hid after shutdown --- src/android/app/src/main/jni/native.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/android/app/src/main/jni/native.cpp b/src/android/app/src/main/jni/native.cpp index 64663b0845..0c82eed3ea 100644 --- a/src/android/app/src/main/jni/native.cpp +++ b/src/android/app/src/main/jni/native.cpp @@ -316,8 +316,10 @@ void EmulationSession::ShutdownEmulation() { m_is_running = false; - // Unload user input. - m_system.HIDCore().UnloadInputDevices(); + SCOPE_EXIT({ + // Unload user input. + m_system.HIDCore().UnloadInputDevices(); + }); // Shutdown the main emulated process if (m_load_result == Core::SystemResultStatus::Success) {