From 5f037ac015e6d76d030a163753db5ff58cdff49b Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Tue, 8 Feb 2011 20:05:25 +0000 Subject: Initial maemo platform support Adds Nokia N900, N810 and N800 support. Features: - Introduce maemo specific platform defines - Play audio in silent mode - Stop playback on incoming calls - Battery level readout - Bluetooth headset support - Save CPU by disabling screen updates if the display is off or the app doesn't have input focus - N900: GStreamer audio backend Kudos to kugel for the code review. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29248 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/hosted/sdl/app/button-application.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'firmware/target/hosted/sdl/app') diff --git a/firmware/target/hosted/sdl/app/button-application.c b/firmware/target/hosted/sdl/app/button-application.c index 2ad09dc373..72f4a1770d 100644 --- a/firmware/target/hosted/sdl/app/button-application.c +++ b/firmware/target/hosted/sdl/app/button-application.c @@ -30,6 +30,9 @@ int key_to_button(int keyboard_key) int new_btn = BUTTON_NONE; switch (keyboard_key) { +#if (CONFIG_PLATFORM & PLATFORM_MAEMO4) + case SDLK_ESCAPE: +#endif case SDLK_KP7: new_btn = BUTTON_TOPLEFT; break; @@ -37,6 +40,9 @@ int key_to_button(int keyboard_key) case SDLK_UP: new_btn = BUTTON_TOPMIDDLE; break; +#if (CONFIG_PLATFORM & PLATFORM_MAEMO4) + case SDLK_F7: +#endif case SDLK_KP9: new_btn = BUTTON_TOPRIGHT; break; @@ -44,6 +50,10 @@ int key_to_button(int keyboard_key) case SDLK_LEFT: new_btn = BUTTON_MIDLEFT; break; +#if (CONFIG_PLATFORM & PLATFORM_MAEMO) + case SDLK_RETURN: + case SDLK_KP_ENTER: +#endif case SDLK_KP5: new_btn = BUTTON_CENTER; break; @@ -51,6 +61,9 @@ int key_to_button(int keyboard_key) case SDLK_RIGHT: new_btn = BUTTON_MIDRIGHT; break; +#if (CONFIG_PLATFORM & PLATFORM_MAEMO4) + case SDLK_F6: +#endif case SDLK_KP1: new_btn = BUTTON_BOTTOMLEFT; break; @@ -58,6 +71,9 @@ int key_to_button(int keyboard_key) case SDLK_DOWN: new_btn = BUTTON_BOTTOMMIDDLE; break; +#if (CONFIG_PLATFORM & PLATFORM_MAEMO4) + case SDLK_F8: +#endif case SDLK_KP3: new_btn = BUTTON_BOTTOMRIGHT; break; -- cgit v1.2.3