From e2a4ba1b2af7ef18b89f8a916599a2d7fb330cf2 Mon Sep 17 00:00:00 2001 From: ekeeke31 Date: Sun, 3 May 2009 18:40:51 +0000 Subject: [PATCH] fixed controller settings menu navigation when using gamepad --- source/gx/gui/menu.c | 78 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/source/gx/gui/menu.c b/source/gx/gui/menu.c index 5dd37ad..96a7a1b 100644 --- a/source/gx/gui/menu.c +++ b/source/gx/gui/menu.c @@ -1868,6 +1868,84 @@ static void ctrl_raz(void) max++; } } + + if (m->buttons[2].state & BUTTON_ACTIVE) + { + m->buttons[0].shift[3] = 2; + } + else if (m->buttons[6].state & BUTTON_ACTIVE) + { + m->buttons[0].shift[3] = 6; + } + else + { + m->buttons[0].shift[3] = 0; + } + + if (m->buttons[6].state & BUTTON_ACTIVE) + { + m->buttons[1].shift[3] = 5; + } + else if (m->buttons[2].state & BUTTON_ACTIVE) + { + m->buttons[1].shift[3] = 1; + } + else + { + m->buttons[1].shift[3] = 0; + } + + if (m->buttons[3].state & BUTTON_ACTIVE) + { + m->buttons[2].shift[1] = 1; + } + else if (m->buttons[6].state & BUTTON_ACTIVE) + { + m->buttons[2].shift[1] = 4; + } + else + { + m->buttons[2].shift[1] = 0; + } + + if (m->buttons[5].state & BUTTON_ACTIVE) + { + m->buttons[6].shift[0] = 1; + } + else if (m->buttons[2].state & BUTTON_ACTIVE) + { + m->buttons[6].shift[0] = 4; + } + else + { + m->buttons[6].shift[0] = 0; + } + + if (m->buttons[6].state & BUTTON_ACTIVE) + { + m->buttons[5].shift[1] = 1; + } + else + { + m->buttons[5].shift[1] = 0; + } + + if (m->buttons[7].state & BUTTON_ACTIVE) + { + m->buttons[6].shift[1] = 1; + if (m->buttons[8].state & BUTTON_ACTIVE) + { + m->buttons[7].shift[1] = 1; + } + else + { + m->buttons[7].shift[1] = 0; + } + } + else + { + m->buttons[6].shift[1] = 0; + } }