summaryrefslogtreecommitdiffstats
path: root/src/core/settings.h
diff options
context:
space:
mode:
authorwwylele <wwylele@gmail.com>2017-01-20 21:46:39 +0100
committerwwylele <wwylele@gmail.com>2017-03-01 22:30:57 +0100
commit1d1329af23221be31c244889609415e0fb0b2641 (patch)
tree4206317bc0e2078b1a1d4eef808e2bd475c47512 /src/core/settings.h
parentInput: add device and factory template (diff)
downloadyuzu-1d1329af23221be31c244889609415e0fb0b2641.tar
yuzu-1d1329af23221be31c244889609415e0fb0b2641.tar.gz
yuzu-1d1329af23221be31c244889609415e0fb0b2641.tar.bz2
yuzu-1d1329af23221be31c244889609415e0fb0b2641.tar.lz
yuzu-1d1329af23221be31c244889609415e0fb0b2641.tar.xz
yuzu-1d1329af23221be31c244889609415e0fb0b2641.tar.zst
yuzu-1d1329af23221be31c244889609415e0fb0b2641.zip
Diffstat (limited to 'src/core/settings.h')
-rw-r--r--src/core/settings.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/core/settings.h b/src/core/settings.h
index b6c75531f..dba57bd6c 100644
--- a/src/core/settings.h
+++ b/src/core/settings.h
@@ -69,6 +69,48 @@ static const std::array<Values, NUM_INPUTS> All = {{
}};
}
+namespace NativeButton {
+enum Values {
+ A,
+ B,
+ X,
+ Y,
+ Up,
+ Down,
+ Left,
+ Right,
+ L,
+ R,
+ Start,
+ Select,
+
+ ZL,
+ ZR,
+
+ Home,
+
+ NumButtons,
+};
+
+constexpr int BUTTON_HID_BEGIN = A;
+constexpr int BUTTON_IR_BEGIN = ZL;
+constexpr int BUTTON_NS_BEGIN = Home;
+
+constexpr int BUTTON_HID_END = BUTTON_IR_BEGIN;
+constexpr int BUTTON_IR_END = BUTTON_NS_BEGIN;
+constexpr int BUTTON_NS_END = NumButtons;
+
+constexpr int NUM_BUTTONS_HID = BUTTON_HID_END - BUTTON_HID_BEGIN;
+constexpr int NUM_BUTTONS_IR = BUTTON_IR_END - BUTTON_IR_BEGIN;
+constexpr int NUM_BUTTONS_NS = BUTTON_NS_END - BUTTON_NS_BEGIN;
+
+static const std::array<const char*, NumButtons> mapping = {{
+ "button_a", "button_b", "button_x", "button_y", "button_up", "button_down", "button_left",
+ "button_right", "button_l", "button_r", "button_start", "button_select", "button_zl",
+ "button_zr", "button_home",
+}};
+} // namespace NativeButton
+
struct Values {
// CheckNew3DS
bool is_new_3ds;
@@ -77,6 +119,8 @@ struct Values {
std::array<int, NativeInput::NUM_INPUTS> input_mappings;
float pad_circle_modifier_scale;
+ std::array<std::string, NativeButton::NumButtons> buttons;
+
// Core
bool use_cpu_jit;