Skip to content

Commit 36f0640

Browse files
committed
Added extended input config support
1 parent e040292 commit 36f0640

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ if(XDG_ON_OSX)
6565
add_definitions(-DUSE_XDG_OSX)
6666
endif()
6767

68+
option(EXTENDED_INPUT_CFG "Extended input config (analog, triggers, XY)" OFF)
69+
if(EXTENDED_INPUT_CFG)
70+
add_definitions(-DEXTENDED_INPUT_CFG)
71+
endif()
72+
6873
#-------------------------------------------------------------------------------
6974

7075
# Require C++11

es-core/src/guis/GuiInputConfig.cpp

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,41 @@ struct InputButton {
1515
const std::string icon;
1616
};
1717

18+
#ifdef EXTENDED_INPUT_CFG
19+
static const int inputCount = 24;
20+
#else
1821
static const int inputCount = 10;
22+
#endif
23+
1924
static const InputButton inputButtons[inputCount] = {
2025
{"Up", false, "UP", ":/help/dpad_up.svg"},
2126
{"Down", false, "DOWN", ":/help/dpad_down.svg"},
2227
{"Left", false, "LEFT", ":/help/dpad_left.svg"},
2328
{"Right", false, "RIGHT", ":/help/dpad_right.svg"},
2429
{"A", false, "A", ":/help/button_a.svg"},
2530
{"B", false, "B", ":/help/button_b.svg"},
31+
#ifdef EXTENDED_INPUT_CFG
32+
{"X", true, "X", ":/help/button_x.svg"},
33+
{"Y", true, "Y", ":/help/button_y.svg"},
34+
#endif
2635
{"Start", false, "START", ":/help/button_start.svg"},
2736
{"Select", false, "SELECT", ":/help/button_select.svg"},
2837
{"LeftShoulder", true, "LEFT SHOULDER", ":/help/button_l.svg"},
29-
{"RightShoulder", true, "RIGHT SHOULDER", ":/help/button_r.svg"}
38+
{"RightShoulder", true, "RIGHT SHOULDER", ":/help/button_r.svg"},
39+
#ifdef EXTENDED_INPUT_CFG
40+
{"LeftTrigger", true, "LEFT TRIGGER", ":/help/button_l.svg"},
41+
{"RightTrigger", true, "RIGHT TRIGGER", ":/help/button_r.svg"},
42+
{"LeftThumb", true, "LEFT THUMB", ":/help/analog_thumb.svg"},
43+
{"RightThumb", true, "RIGHT THUMB", ":/help/analog_thumb.svg"},
44+
{"LeftAnalogUp", true, "LEFT ANALOG UP", ":/help/analog_up.svg"},
45+
{"LeftAnalogDown", true, "LEFT ANALOG DOWN", ":/help/analog_down.svg"},
46+
{"LeftAnalogLeft", true, "LEFT ANALOG LEFT", ":/help/analog_left.svg"},
47+
{"LeftAnalogRight", true, "LEFT ANALOG RIGHT", ":/help/analog_right.svg"},
48+
{"RightAnalogUp", true, "RIGHT ANALOG UP", ":/help/analog_up.svg"},
49+
{"RightAnalogDown", true, "RIGHT ANALOG DOWN", ":/help/analog_down.svg"},
50+
{"RightAnalogLeft", true, "RIGHT ANALOG LEFT", ":/help/analog_left.svg"},
51+
{"RightAnalogRight", true, "RIGHT ANALOG RIGHT", ":/help/analog_right.svg"},
52+
#endif
3053
};
3154

3255
//MasterVolUp and MasterVolDown are also hooked up, but do not appear on this screen.

0 commit comments

Comments
 (0)