summaryrefslogtreecommitdiffstats
path: root/src/common/settings_input.h
diff options
context:
space:
mode:
authorFeng Chen <VonChenPlus@gmail.com>2021-12-18 06:57:14 +0100
committerGitHub <noreply@github.com>2021-12-18 06:57:14 +0100
commite49184e6069a9d791d2df3c1958f5c4b1187e124 (patch)
treeb776caf722e0be0e680f67b0ad0842628162ef1c /src/common/settings_input.h
parentImplement convert legacy to generic (diff)
parentMerge pull request #7570 from ameerj/favorites-expanded (diff)
downloadyuzu-e49184e6069a9d791d2df3c1958f5c4b1187e124.tar
yuzu-e49184e6069a9d791d2df3c1958f5c4b1187e124.tar.gz
yuzu-e49184e6069a9d791d2df3c1958f5c4b1187e124.tar.bz2
yuzu-e49184e6069a9d791d2df3c1958f5c4b1187e124.tar.lz
yuzu-e49184e6069a9d791d2df3c1958f5c4b1187e124.tar.xz
yuzu-e49184e6069a9d791d2df3c1958f5c4b1187e124.tar.zst
yuzu-e49184e6069a9d791d2df3c1958f5c4b1187e124.zip
Diffstat (limited to 'src/common/settings_input.h')
-rw-r--r--src/common/settings_input.h70
1 files changed, 51 insertions, 19 deletions
diff --git a/src/common/settings_input.h b/src/common/settings_input.h
index 609600582..4ff37e186 100644
--- a/src/common/settings_input.h
+++ b/src/common/settings_input.h
@@ -62,11 +62,22 @@ enum Values : int {
constexpr int STICK_HID_BEGIN = LStick;
constexpr int STICK_HID_END = NumAnalogs;
-constexpr int NUM_STICKS_HID = NumAnalogs;
extern const std::array<const char*, NumAnalogs> mapping;
} // namespace NativeAnalog
+namespace NativeTrigger {
+enum Values : int {
+ LTrigger,
+ RTrigger,
+
+ NumTriggers,
+};
+
+constexpr int TRIGGER_HID_BEGIN = LTrigger;
+constexpr int TRIGGER_HID_END = NumTriggers;
+} // namespace NativeTrigger
+
namespace NativeVibration {
enum Values : int {
LeftVibrationDevice,
@@ -115,10 +126,20 @@ constexpr int NUM_MOUSE_HID = NumMouseButtons;
extern const std::array<const char*, NumMouseButtons> mapping;
} // namespace NativeMouseButton
+namespace NativeMouseWheel {
+enum Values {
+ X,
+ Y,
+
+ NumMouseWheels,
+};
+
+extern const std::array<const char*, NumMouseWheels> mapping;
+} // namespace NativeMouseWheel
+
namespace NativeKeyboard {
enum Keys {
None,
- Error,
A = 4,
B,
@@ -156,22 +177,22 @@ enum Keys {
N8,
N9,
N0,
- Enter,
+ Return,
Escape,
Backspace,
Tab,
Space,
Minus,
- Equal,
- LeftBrace,
- RightBrace,
- Backslash,
+ Plus,
+ OpenBracket,
+ CloseBracket,
+ Pipe,
Tilde,
Semicolon,
- Apostrophe,
- Grave,
+ Quote,
+ Backquote,
Comma,
- Dot,
+ Period,
Slash,
CapsLockKey,
@@ -188,7 +209,7 @@ enum Keys {
F11,
F12,
- SystemRequest,
+ PrintScreen,
ScrollLockKey,
Pause,
Insert,
@@ -257,8 +278,18 @@ enum Keys {
ScrollLockActive,
KPComma,
- KPLeftParenthesis,
- KPRightParenthesis,
+ Ro = 0x87,
+ KatakanaHiragana,
+ Yen,
+ Henkan,
+ Muhenkan,
+ NumPadCommaPc98,
+
+ HangulEnglish = 0x90,
+ Hanja,
+ KatakanaKey,
+ HiraganaKey,
+ ZenkakuHankaku,
LeftControlKey = 0xE0,
LeftShiftKey,
@@ -307,6 +338,8 @@ enum Modifiers {
CapsLock,
ScrollLock,
NumLock,
+ Katakana,
+ Hiragana,
NumKeyboardMods,
};
@@ -324,11 +357,6 @@ constexpr int NUM_KEYBOARD_MODS_HID = NumKeyboardMods;
using AnalogsRaw = std::array<std::string, NativeAnalog::NumAnalogs>;
using ButtonsRaw = std::array<std::string, NativeButton::NumButtons>;
using MotionsRaw = std::array<std::string, NativeMotion::NumMotions>;
-using VibrationsRaw = std::array<std::string, NativeVibration::NumVibrations>;
-
-using MouseButtonsRaw = std::array<std::string, NativeMouseButton::NumMouseButtons>;
-using KeyboardKeysRaw = std::array<std::string, NativeKeyboard::NumKeyboardKeys>;
-using KeyboardModsRaw = std::array<std::string, NativeKeyboard::NumKeyboardMods>;
constexpr u32 JOYCON_BODY_NEON_RED = 0xFF3C28;
constexpr u32 JOYCON_BUTTONS_NEON_RED = 0x1E0A0A;
@@ -342,6 +370,11 @@ enum class ControllerType {
RightJoycon,
Handheld,
GameCube,
+ Pokeball,
+ NES,
+ SNES,
+ N64,
+ SegaGenesis,
};
struct PlayerInput {
@@ -349,7 +382,6 @@ struct PlayerInput {
ControllerType controller_type;
ButtonsRaw buttons;
AnalogsRaw analogs;
- VibrationsRaw vibrations;
MotionsRaw motions;
bool vibration_enabled;