diff options
Diffstat (limited to 'uisimulator')
-rw-r--r-- | uisimulator/sdl/UI-cowond2.bmp | bin | 0 -> 428454 bytes | |||
-rw-r--r-- | uisimulator/sdl/button.c | 36 | ||||
-rw-r--r-- | uisimulator/sdl/uisdl.h | 13 |
3 files changed, 49 insertions, 0 deletions
diff --git a/uisimulator/sdl/UI-cowond2.bmp b/uisimulator/sdl/UI-cowond2.bmp Binary files differnew file mode 100644 index 0000000000..e86221ca7e --- /dev/null +++ b/uisimulator/sdl/UI-cowond2.bmp diff --git a/uisimulator/sdl/button.c b/uisimulator/sdl/button.c index 4211ba3f04..3c825eac72 100644 --- a/uisimulator/sdl/button.c +++ b/uisimulator/sdl/button.c @@ -632,6 +632,7 @@ void button_event(int key, bool pressed) case SDLK_INSERT: new_btn = BUTTON_RC_MODE; break; + #elif CONFIG_KEYPAD == MROBE100_PAD case SDLK_KP4: case SDLK_LEFT: @@ -668,6 +669,41 @@ void button_event(int key, bool pressed) case SDLK_SPACE: new_btn = BUTTON_PLAY; break; + +#elif CONFIG_KEYPAD == COWOND2_PAD + case SDLK_KP4: + case SDLK_LEFT: + new_btn = BUTTON_LEFT; + break; + case SDLK_KP6: + case SDLK_RIGHT: + new_btn = BUTTON_RIGHT; + break; + case SDLK_KP8: + case SDLK_UP: + new_btn = BUTTON_UP; + break; + case SDLK_KP2: + case SDLK_DOWN: + new_btn = BUTTON_DOWN; + break; + case SDLK_KP3: + new_btn = BUTTON_POWER; + break; + case SDLK_KP5: + case SDLK_KP_ENTER: + case SDLK_RETURN: + new_btn = BUTTON_SELECT; + break; + case SDLK_KP_PLUS: + new_btn = BUTTON_PLUS; + break; + case SDLK_KP_MINUS: + new_btn = BUTTON_MINUS; + break; + case SDLK_KP9: + new_btn = BUTTON_MENU; + break; #else #error No keymap defined! #endif /* CONFIG_KEYPAD */ diff --git a/uisimulator/sdl/uisdl.h b/uisimulator/sdl/uisdl.h index 7d11bfab20..49556a99fe 100644 --- a/uisimulator/sdl/uisdl.h +++ b/uisimulator/sdl/uisdl.h @@ -321,6 +321,19 @@ #define UI_LCD_POSY 25 /* y position of lcd */ #define UI_LCD_WIDTH 160 #define UI_LCD_HEIGHT 128 + +#elif defined(COWON_D2) +#define UI_TITLE "Cowon D2" +#define UI_WIDTH 420 /* width of GUI window */ +#define UI_HEIGHT 340 /* height of GUI window */ +#define UI_LCD_POSX 50 /* x position of lcd */ +#define UI_LCD_POSY 50 /* y position of lcd */ +#define UI_LCD_WIDTH 320 +#define UI_LCD_HEIGHT 240 +#define UI_LCD_BGCOLOR 32, 32, 32 /* bkgnd color of LCD (no backlight) */ +#define UI_LCD_BGCOLORLIGHT 192, 192, 192 /* bkgnd color of LCD (backlight) */ +#define UI_LCD_BLACK 0, 0, 0 /* black */ + #endif extern SDL_Surface *gui_surface; extern bool background; /* True if the background image is enabled */ |