summaryrefslogtreecommitdiffstats
path: root/src/core/hid/emulated_devices.cpp
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2021-10-17 07:33:00 +0200
committerNarr the Reg <juangerman-13@hotmail.com>2021-11-25 03:30:24 +0100
commit72e5920240381cbe775dc38fcdff88cf46b55101 (patch)
tree3f981ca452357b19ae104fdde3692c8ad4a3bf0f /src/core/hid/emulated_devices.cpp
parentkraken: Fix errors from rebase and format files (diff)
downloadyuzu-72e5920240381cbe775dc38fcdff88cf46b55101.tar
yuzu-72e5920240381cbe775dc38fcdff88cf46b55101.tar.gz
yuzu-72e5920240381cbe775dc38fcdff88cf46b55101.tar.bz2
yuzu-72e5920240381cbe775dc38fcdff88cf46b55101.tar.lz
yuzu-72e5920240381cbe775dc38fcdff88cf46b55101.tar.xz
yuzu-72e5920240381cbe775dc38fcdff88cf46b55101.tar.zst
yuzu-72e5920240381cbe775dc38fcdff88cf46b55101.zip
Diffstat (limited to 'src/core/hid/emulated_devices.cpp')
-rw-r--r--src/core/hid/emulated_devices.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/core/hid/emulated_devices.cpp b/src/core/hid/emulated_devices.cpp
index 3caf90714..54a753d8a 100644
--- a/src/core/hid/emulated_devices.cpp
+++ b/src/core/hid/emulated_devices.cpp
@@ -114,7 +114,7 @@ Common::ParamPackage EmulatedDevices::GetMouseButtonParam(std::size_t index) con
return mouse_button_params[index];
}
-void EmulatedDevices::SetButtonParam(std::size_t index, Common::ParamPackage param) {
+void EmulatedDevices::SetMouseButtonParam(std::size_t index, Common::ParamPackage param) {
if (index >= mouse_button_params.size()) {
return;
}
@@ -132,7 +132,7 @@ void EmulatedDevices::SetKeyboardButton(Input::CallbackStatus callback, std::siz
auto& current_status = device_status.keyboard_values[index];
current_status.toggle = new_status.toggle;
- // Update button status with current
+ // Update button status with current status
if (!current_status.toggle) {
current_status.locked = false;
if (current_status.value != new_status.value) {
@@ -147,7 +147,7 @@ void EmulatedDevices::SetKeyboardButton(Input::CallbackStatus callback, std::siz
value_changed = true;
}
- // Unlock button ready for next press
+ // Unlock button, ready for next press
if (!new_status.value && current_status.locked) {
current_status.locked = false;
}
@@ -168,7 +168,7 @@ void EmulatedDevices::SetKeyboardButton(Input::CallbackStatus callback, std::siz
// interface_status.keyboard_state.a.Assign(current_status.value);
// break;
// ....
- //}
+ // }
TriggerOnChange(DeviceTriggerType::Keyboard);
}
@@ -303,6 +303,14 @@ void EmulatedDevices::SetMouseButton(Input::CallbackStatus callback, std::size_t
TriggerOnChange(DeviceTriggerType::Mouse);
}
+KeyboardValues EmulatedDevices::GetKeyboardValues() const {
+ return device_status.keyboard_values;
+}
+
+KeyboardModifierValues EmulatedDevices::GetKeyboardModdifierValues() const {
+ return device_status.keyboard_moddifier_values;
+}
+
MouseButtonValues EmulatedDevices::GetMouseButtonsValues() const {
return device_status.mouse_button_values;
}