input: support for 2 buttons sets.
This commit is contained in:
32
menu.cpp
32
menu.cpp
@@ -170,7 +170,7 @@ const char *config_autofire_msg[] = { " AUTOFIRE OFF", " AUTOFIRE
|
||||
const char *config_cd32pad_msg[] = { "OFF", "ON" };
|
||||
const char *config_button_turbo_msg[] = { "OFF", "FAST", "MEDIUM", "SLOW" };
|
||||
const char *config_button_turbo_choice_msg[] = { "A only", "B only", "A & B" };
|
||||
const char *joy_button_map[] = { "RIGHT", "LEFT", "DOWN", "UP", "BUTTON 1", "BUTTON 2", "BUTTON 3", "BUTTON 4", "KBD TOGGLE", "BUTTON OSD", " Stick X: Tilt RIGHT", " Stick Y: Tilt DOWN", " Mouse emu X: Tilt RIGHT", " Mouse emu Y: Tilt DOWN" };
|
||||
const char *joy_button_map[] = { "RIGHT", "LEFT", "DOWN", "UP", "BUTTON 1", "BUTTON 2", "BUTTON 3", "BUTTON 4", "KBD TOGGLE", "MENU", " Stick X: Tilt RIGHT", " Stick Y: Tilt DOWN", " Mouse emu X: Tilt RIGHT", " Mouse emu Y: Tilt DOWN" };
|
||||
const char *joy_ana_map[] = { " DPAD test: Press RIGHT", " DPAD test: Press DOWN", " Stick 1: Tilt RIGHT", " Stick 1: Tilt DOWN", " Stick 2: Tilt RIGHT", " Stick 2: Tilt DOWN" };
|
||||
const char *config_stereo_msg[] = { "0%", "25%", "50%", "100%" };
|
||||
const char *config_uart_msg[] = { " None", " PPP", " Console", " MIDI" };
|
||||
@@ -1754,14 +1754,27 @@ void HandleUI(void)
|
||||
OsdSetTitle("Define buttons", 0);
|
||||
menustate = MENU_JOYDIGMAP1;
|
||||
parentstate = MENU_JOYDIGMAP;
|
||||
for (int i = 0; i < OsdGetSize(); i++) OsdWrite(i, "", 0, 0);
|
||||
OsdWrite(8, " Esc -> Cancel", 0, 0);
|
||||
OsdWrite(9, " Enter -> Cancel", 0, 0);
|
||||
OsdWrite(10," Space -> Skip", 0, 0);
|
||||
for (int i = 0; i < OsdGetSize(); i++) OsdWrite(i);
|
||||
OsdWrite(7, " Esc \x16 Cancel");
|
||||
OsdWrite(8, " Enter \x16 Finish");
|
||||
OsdWrite(9, " Space \x16 Skip");
|
||||
if (!is_menu_core())
|
||||
{
|
||||
OsdWrite(13, " You may define 2 sets of");
|
||||
OsdWrite(14, " buttons on the same gamepad");
|
||||
}
|
||||
break;
|
||||
|
||||
case MENU_JOYDIGMAP1:
|
||||
{
|
||||
if (get_map_clear())
|
||||
{
|
||||
OsdWrite(3);
|
||||
OsdWrite(4, " Clearing");
|
||||
OsdWrite(5);
|
||||
break;
|
||||
}
|
||||
|
||||
const char* p = 0;
|
||||
if (get_map_button() < 0)
|
||||
{
|
||||
@@ -1807,11 +1820,12 @@ void HandleUI(void)
|
||||
}
|
||||
|
||||
OsdWrite(3, s, 0, 0);
|
||||
OsdWrite(4);
|
||||
if (get_map_vid() || get_map_pid())
|
||||
{
|
||||
if (!is_menu_core() && get_map_type() && !has_default_map())
|
||||
{
|
||||
for (int i = 0; i < OsdGetSize(); i++) OsdWrite(i, "", 0, 0);
|
||||
for (int i = 0; i < OsdGetSize(); i++) OsdWrite(i);
|
||||
OsdWrite(6, " You need to define this");
|
||||
OsdWrite(7, " joystick in Menu core first");
|
||||
OsdWrite(9, " Press ESC/Enter");
|
||||
@@ -1823,10 +1837,10 @@ void HandleUI(void)
|
||||
sprintf(s, " %s ID: %04x:%04x", get_map_type() ? "Joystick" : "Keyboard", get_map_vid(), get_map_pid());
|
||||
if (get_map_button() > 0)
|
||||
{
|
||||
OsdWrite(9, " Enter -> Finish", 0, 0);
|
||||
if (!get_map_type()) OsdWrite(10);
|
||||
if (!get_map_type()) OsdWrite(9);
|
||||
}
|
||||
OsdWrite(5, s, 0, 0);
|
||||
OsdWrite(5, s);
|
||||
if (!is_menu_core()) OsdWrite(10, " Menu/F12 \x16 Clear all");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user