mirror of
https://github.com/yuzu-emu/yuzu-mainline.git
synced 2024-12-23 19:45:38 +00:00
Merge pull request #9317 from german77/input-crash
yuzu-cmd: Fix input callback crash on close
This commit is contained in:
commit
a2fde04da9
|
@ -145,6 +145,7 @@ void EmulatedDevices::UnloadInput() {
|
|||
for (auto& button : keyboard_modifier_devices) {
|
||||
button.reset();
|
||||
}
|
||||
ring_analog_device.reset();
|
||||
}
|
||||
|
||||
void EmulatedDevices::EnableConfiguration() {
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue