summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2022-11-27 21:39:24 +0100
committerGitHub <noreply@github.com>2022-11-27 21:39:24 +0100
commita2fde04da9630a5bf4948a0d2798d969956eb389 (patch)
tree9aa1133d4b1635e0ccb111c2a73c01c1d044a148
parentMerge pull request #9323 from german77/intructions (diff)
parentyuzu-cmd: Fix input callback crash on close (diff)
downloadyuzu-a2fde04da9630a5bf4948a0d2798d969956eb389.tar
yuzu-a2fde04da9630a5bf4948a0d2798d969956eb389.tar.gz
yuzu-a2fde04da9630a5bf4948a0d2798d969956eb389.tar.bz2
yuzu-a2fde04da9630a5bf4948a0d2798d969956eb389.tar.lz
yuzu-a2fde04da9630a5bf4948a0d2798d969956eb389.tar.xz
yuzu-a2fde04da9630a5bf4948a0d2798d969956eb389.tar.zst
yuzu-a2fde04da9630a5bf4948a0d2798d969956eb389.zip
Diffstat (limited to '')
-rw-r--r--src/core/hid/emulated_devices.cpp1
-rw-r--r--src/input_common/main.cpp10
-rw-r--r--src/yuzu_cmd/emu_window/emu_window_sdl2.cpp2
3 files changed, 13 insertions, 0 deletions
diff --git a/src/core/hid/emulated_devices.cpp b/src/core/hid/emulated_devices.cpp
index 8d367b546..658dbd318 100644
--- a/src/core/hid/emulated_devices.cpp
+++ b/src/core/hid/emulated_devices.cpp
@@ -145,6 +145,7 @@ void EmulatedDevices::UnloadInput() {
for (auto& button : keyboard_modifier_devices) {
button.reset();
}
+ ring_analog_device.reset();
}
void EmulatedDevices::EnableConfiguration() {
diff --git a/src/input_common/main.cpp b/src/input_common/main.cpp
index b2064ef95..76df133f3 100644
--- a/src/input_common/main.cpp
+++ b/src/input_common/main.cpp
@@ -138,6 +138,16 @@ struct InputSubsystem::Impl {
Common::Input::UnregisterFactory<Common::Input::OutputDevice>(tas_input->GetEngineName());
tas_input.reset();
+ Common::Input::UnregisterFactory<Common::Input::InputDevice>(camera->GetEngineName());
+ Common::Input::UnregisterFactory<Common::Input::OutputDevice>(camera->GetEngineName());
+ camera.reset();
+
+ Common::Input::UnregisterFactory<Common::Input::InputDevice>(
+ virtual_amiibo->GetEngineName());
+ Common::Input::UnregisterFactory<Common::Input::OutputDevice>(
+ virtual_amiibo->GetEngineName());
+ virtual_amiibo.reset();
+
#ifdef HAVE_SDL2
Common::Input::UnregisterFactory<Common::Input::InputDevice>(sdl->GetEngineName());
Common::Input::UnregisterFactory<Common::Input::OutputDevice>(sdl->GetEngineName());
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp
index 4ac72c2f6..37dd1747c 100644
--- a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp
+++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp
@@ -7,6 +7,7 @@
#include "common/scm_rev.h"
#include "common/settings.h"
#include "core/core.h"
+#include "core/hid/hid_core.h"
#include "core/perf_stats.h"
#include "input_common/drivers/keyboard.h"
#include "input_common/drivers/mouse.h"
@@ -26,6 +27,7 @@ EmuWindow_SDL2::EmuWindow_SDL2(InputCommon::InputSubsystem* input_subsystem_, Co
}
EmuWindow_SDL2::~EmuWindow_SDL2() {
+ system.HIDCore().UnloadInputDevices();
input_subsystem->Shutdown();
SDL_Quit();
}