diff options
author | german77 <juangerman-13@hotmail.com> | 2021-10-31 04:23:10 +0100 |
---|---|---|
committer | Narr the Reg <juangerman-13@hotmail.com> | 2021-11-25 03:30:26 +0100 |
commit | 2b1b0c2a30e242b08ec120e09803ec54d5445703 (patch) | |
tree | 9a10400a7e4403b288eee3aae8a52f1d5be912de /src/core/hid/emulated_devices.h | |
parent | input_common: Revert deleted TAS functions (diff) | |
download | yuzu-2b1b0c2a30e242b08ec120e09803ec54d5445703.tar yuzu-2b1b0c2a30e242b08ec120e09803ec54d5445703.tar.gz yuzu-2b1b0c2a30e242b08ec120e09803ec54d5445703.tar.bz2 yuzu-2b1b0c2a30e242b08ec120e09803ec54d5445703.tar.lz yuzu-2b1b0c2a30e242b08ec120e09803ec54d5445703.tar.xz yuzu-2b1b0c2a30e242b08ec120e09803ec54d5445703.tar.zst yuzu-2b1b0c2a30e242b08ec120e09803ec54d5445703.zip |
Diffstat (limited to 'src/core/hid/emulated_devices.h')
-rw-r--r-- | src/core/hid/emulated_devices.h | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/core/hid/emulated_devices.h b/src/core/hid/emulated_devices.h index 7ed95eac6..418b2f9b5 100644 --- a/src/core/hid/emulated_devices.h +++ b/src/core/hid/emulated_devices.h @@ -4,10 +4,13 @@ #pragma once +#include <array> #include <functional> +#include <memory> #include <mutex> #include <unordered_map> +#include "common/common_types.h" #include "common/input.h" #include "common/param_package.h" #include "common/settings.h" @@ -16,21 +19,22 @@ namespace Core::HID { -using KeyboardDevices = - std::array<std::unique_ptr<Input::InputDevice>, Settings::NativeKeyboard::NumKeyboardKeys>; -using KeyboardModifierDevices = - std::array<std::unique_ptr<Input::InputDevice>, Settings::NativeKeyboard::NumKeyboardMods>; -using MouseButtonDevices = - std::array<std::unique_ptr<Input::InputDevice>, Settings::NativeMouseButton::NumMouseButtons>; +using KeyboardDevices = std::array<std::unique_ptr<Common::Input::InputDevice>, + Settings::NativeKeyboard::NumKeyboardKeys>; +using KeyboardModifierDevices = std::array<std::unique_ptr<Common::Input::InputDevice>, + Settings::NativeKeyboard::NumKeyboardMods>; +using MouseButtonDevices = std::array<std::unique_ptr<Common::Input::InputDevice>, + Settings::NativeMouseButton::NumMouseButtons>; using MouseButtonParams = std::array<Common::ParamPackage, Settings::NativeMouseButton::NumMouseButtons>; -using KeyboardValues = std::array<Input::ButtonStatus, Settings::NativeKeyboard::NumKeyboardKeys>; +using KeyboardValues = + std::array<Common::Input::ButtonStatus, Settings::NativeKeyboard::NumKeyboardKeys>; using KeyboardModifierValues = - std::array<Input::ButtonStatus, Settings::NativeKeyboard::NumKeyboardMods>; + std::array<Common::Input::ButtonStatus, Settings::NativeKeyboard::NumKeyboardMods>; using MouseButtonValues = - std::array<Input::ButtonStatus, Settings::NativeMouseButton::NumMouseButtons>; + std::array<Common::Input::ButtonStatus, Settings::NativeMouseButton::NumMouseButtons>; struct MousePosition { s32 x; @@ -151,21 +155,21 @@ private: * @param callback: A CallbackStatus containing the key status * @param index: key ID to be updated */ - void SetKeyboardButton(Input::CallbackStatus callback, std::size_t index); + void SetKeyboardButton(Common::Input::CallbackStatus callback, std::size_t index); /** * Updates the touch status of the console * @param callback: A CallbackStatus containing the modifier key status * @param index: modifier key ID to be updated */ - void SetKeyboardModifier(Input::CallbackStatus callback, std::size_t index); + void SetKeyboardModifier(Common::Input::CallbackStatus callback, std::size_t index); /** * Updates the touch status of the console * @param callback: A CallbackStatus containing the button status * @param index: Button ID of the to be updated */ - void SetMouseButton(Input::CallbackStatus callback, std::size_t index); + void SetMouseButton(Common::Input::CallbackStatus callback, std::size_t index); /** * Triggers a callback that something has changed on the device status |