summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-11-02 02:54:16 +0100
committerZach Hilman <zachhilman@gmail.com>2018-11-19 05:21:33 +0100
commitc77454b9d009e3e45b1b140743338f3063fc1656 (patch)
treee42c10b46f0ccd50f90388ac9b26b1ff9c334d19 /src
parentsettings: Add Native type for keyboard (diff)
downloadyuzu-c77454b9d009e3e45b1b140743338f3063fc1656.tar
yuzu-c77454b9d009e3e45b1b140743338f3063fc1656.tar.gz
yuzu-c77454b9d009e3e45b1b140743338f3063fc1656.tar.bz2
yuzu-c77454b9d009e3e45b1b140743338f3063fc1656.tar.lz
yuzu-c77454b9d009e3e45b1b140743338f3063fc1656.tar.xz
yuzu-c77454b9d009e3e45b1b140743338f3063fc1656.tar.zst
yuzu-c77454b9d009e3e45b1b140743338f3063fc1656.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/settings.h51
1 files changed, 48 insertions, 3 deletions
diff --git a/src/core/settings.h b/src/core/settings.h
index 54a4859b9..9cc3c1dc8 100644
--- a/src/core/settings.h
+++ b/src/core/settings.h
@@ -341,6 +341,46 @@ constexpr int NUM_KEYBOARD_MODS_HID = NumKeyboardMods;
} // namespace NativeKeyboard
+using ButtonsRaw = std::array<std::string, NativeButton::NumButtons>;
+using AnalogsRaw = std::array<std::string, NativeAnalog::NumAnalogs>;
+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;
+constexpr u32 JOYCON_BODY_NEON_BLUE = 0x0AB9E6;
+constexpr u32 JOYCON_BUTTONS_NEON_BLUE = 0x001E1E;
+
+enum class ControllerType {
+ ProController,
+ DualJoycon,
+ RightJoycon,
+ LeftJoycon,
+};
+
+struct PlayerInput {
+ bool connected;
+ ControllerType type;
+ ButtonsRaw buttons;
+ AnalogsRaw analogs;
+
+ u32 body_color_right;
+ u32 button_color_right;
+ u32 body_color_left;
+ u32 button_color_left;
+};
+
+struct TouchscreenInput {
+ bool enabled;
+ std::string device;
+
+ u32 finger;
+ u32 diameter_x;
+ u32 diameter_y;
+ u32 rotation_angle;
+};
+
struct Values {
// System
bool use_docked_mode;
@@ -350,8 +390,8 @@ struct Values {
s32 language_index;
// Controls
- std::array<std::string, NativeButton::NumButtons> buttons;
- std::array<std::string, NativeAnalog::NumAnalogs> analogs;
+ std::array<PlayerInput, 10> players;
+
bool mouse_enabled;
std::string mouse_device;
MouseButtonsRaw mouse_buttons;
@@ -359,8 +399,13 @@ struct Values {
bool keyboard_enabled;
KeyboardKeysRaw keyboard_keys;
KeyboardModsRaw keyboard_mods;
+
+ bool debug_pad_enabled;
+ ButtonsRaw debug_pad_buttons;
+ AnalogsRaw debug_pad_analogs;
+
std::string motion_device;
- std::string touch_device;
+ TouchscreenInput touchscreen;
std::atomic_bool is_device_reload_pending{true};
// Core