summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2021-10-16 02:07:47 +0200
committerNarr the Reg <juangerman-13@hotmail.com>2021-11-25 03:30:24 +0100
commite0da5c1bbcdf85676f968b63c8ae2587f0464193 (patch)
tree588837d1181d6b9d3bd4536fd4d2c5877335632d /src/core
parentcore/hid: Add output devices (diff)
downloadyuzu-e0da5c1bbcdf85676f968b63c8ae2587f0464193.tar
yuzu-e0da5c1bbcdf85676f968b63c8ae2587f0464193.tar.gz
yuzu-e0da5c1bbcdf85676f968b63c8ae2587f0464193.tar.bz2
yuzu-e0da5c1bbcdf85676f968b63c8ae2587f0464193.tar.lz
yuzu-e0da5c1bbcdf85676f968b63c8ae2587f0464193.tar.xz
yuzu-e0da5c1bbcdf85676f968b63c8ae2587f0464193.tar.zst
yuzu-e0da5c1bbcdf85676f968b63c8ae2587f0464193.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hid/emulated_controller.cpp6
-rw-r--r--src/core/hle/service/hid/hid.cpp1
2 files changed, 5 insertions, 2 deletions
diff --git a/src/core/hid/emulated_controller.cpp b/src/core/hid/emulated_controller.cpp
index b9d16657a..b04ab4cd8 100644
--- a/src/core/hid/emulated_controller.cpp
+++ b/src/core/hid/emulated_controller.cpp
@@ -91,6 +91,7 @@ void EmulatedController::ReloadFromSettings() {
}
void EmulatedController::ReloadInput() {
+ // If you load any device here add the equivalent to the UnloadInput() function
const auto player_index = NpadIdTypeToIndex(npad_id_type);
const auto left_side = button_params[Settings::NativeButton::ZL];
const auto right_side = button_params[Settings::NativeButton::ZR];
@@ -113,7 +114,7 @@ void EmulatedController::ReloadInput() {
battery_devices[0] = Input::CreateDevice<Input::InputDevice>(left_side);
battery_devices[1] = Input::CreateDevice<Input::InputDevice>(right_side);
- button_params[Settings::NativeButton::ZL].Set("output",true);
+ button_params[Settings::NativeButton::ZL].Set("output", true);
output_devices[0] =
Input::CreateDevice<Input::OutputDevice>(button_params[Settings::NativeButton::ZL]);
@@ -179,6 +180,9 @@ void EmulatedController::UnloadInput() {
for (auto& battery : battery_devices) {
battery.reset();
}
+ for (auto& output : output_devices) {
+ output.reset();
+ }
}
void EmulatedController::EnableConfiguration() {
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp
index 18f29bb78..5391334f4 100644
--- a/src/core/hle/service/hid/hid.cpp
+++ b/src/core/hle/service/hid/hid.cpp
@@ -8,7 +8,6 @@
#include "common/settings.h"
#include "core/core.h"
#include "core/core_timing.h"
-#include "core/frontend/input.h"
#include "core/hardware_properties.h"
#include "core/hle/ipc_helpers.h"
#include "core/hle/kernel/k_readable_event.h"