From fb224bd0f93389a30960102e40280f8901b9d834 Mon Sep 17 00:00:00 2001 From: Mark Arigo Date: Tue, 7 Jul 2009 03:26:57 +0000 Subject: Philips SA9200: fix the buttons to work with flip screen mode (does anyone use this?). Change to conventional BUTTON_LEFT/BUTTON_RIGHT names and flip the remaining directional buttons. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21698 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/button.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'firmware/drivers/button.c') diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c index 6fbe5de229..6f6eb8f222 100644 --- a/firmware/drivers/button.c +++ b/firmware/drivers/button.c @@ -444,6 +444,10 @@ static int button_flip(int button) #endif #if CONFIG_KEYPAD == SANSA_C200_PAD | BUTTON_VOL_UP | BUTTON_VOL_DOWN +#endif +#if CONFIG_KEYPAD == PHILIPS_SA9200_PAD + | BUTTON_VOL_UP | BUTTON_VOL_DOWN + | BUTTON_NEXT | BUTTON_PREV #endif ); @@ -475,6 +479,16 @@ static int button_flip(int button) if (button & BUTTON_VOL_DOWN) newbutton |= BUTTON_VOL_UP; #endif +#if CONFIG_KEYPAD == PHILIPS_SA9200_PAD + if (button & BUTTON_VOL_UP) + newbutton |= BUTTON_VOL_DOWN; + if (button & BUTTON_VOL_DOWN) + newbutton |= BUTTON_VOL_UP; + if (button & BUTTON_NEXT) + newbutton |= BUTTON_PREV; + if (button & BUTTON_PREV) + newbutton |= BUTTON_NEXT; +#endif return newbutton; } -- cgit v1.2.3