forked from len0rd/rockbox
Add support for Onda VX747 simulator (and yes, it needs a better picture)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20273 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
d33bff2b47
commit
935780e426
6 changed files with 33 additions and 21 deletions
BIN
uisimulator/sdl/UI-ondavx747.bmp
Executable file
BIN
uisimulator/sdl/UI-ondavx747.bmp
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 599 KiB |
|
|
@ -34,16 +34,8 @@
|
|||
static intptr_t button_data; /* data value from last message dequeued */
|
||||
|
||||
#ifdef HAVE_TOUCHSCREEN
|
||||
#include "touchscreen.h"
|
||||
static int mouse_coords = 0;
|
||||
static enum touchscreen_mode touchscreen_mode = TOUCHSCREEN_POINT;
|
||||
void touchscreen_set_mode(enum touchscreen_mode mode)
|
||||
{
|
||||
touchscreen_mode = mode;
|
||||
}
|
||||
enum touchscreen_mode touchscreen_get_mode(void)
|
||||
{
|
||||
return touchscreen_mode;
|
||||
}
|
||||
#endif
|
||||
/* how long until repeat kicks in */
|
||||
#define REPEAT_START 6
|
||||
|
|
@ -124,7 +116,7 @@ void button_event(int key, bool pressed)
|
|||
#ifdef HAVE_TOUCHSCREEN
|
||||
case BUTTON_TOUCHSCREEN:
|
||||
data = mouse_coords;
|
||||
switch (touchscreen_mode)
|
||||
switch (touchscreen_get_mode())
|
||||
{
|
||||
case TOUCHSCREEN_POINT:
|
||||
new_btn = BUTTON_TOUCHSCREEN;
|
||||
|
|
@ -172,8 +164,8 @@ void button_event(int key, bool pressed)
|
|||
case SDLK_F4:
|
||||
if(pressed)
|
||||
{
|
||||
touchscreen_mode = (touchscreen_mode == TOUCHSCREEN_POINT ? TOUCHSCREEN_BUTTON : TOUCHSCREEN_POINT);
|
||||
printf("Touchscreen mode: %s\n", touchscreen_mode == TOUCHSCREEN_POINT ? "TOUCHSCREEN_POINT" : "TOUCHSCREEN_BUTTON");
|
||||
touchscreen_set_mode(touchscreen_get_mode() == TOUCHSCREEN_POINT ? TOUCHSCREEN_BUTTON : TOUCHSCREEN_POINT);
|
||||
printf("Touchscreen mode: %s\n", touchscreen_get_mode() == TOUCHSCREEN_POINT ? "TOUCHSCREEN_POINT" : "TOUCHSCREEN_BUTTON");
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -1091,6 +1083,19 @@ void button_event(int key, bool pressed)
|
|||
case SDLK_KP_PLUS:
|
||||
new_btn = BUTTON_VIEW;
|
||||
break;
|
||||
#elif CONFIG_KEYPAD == ONDAVX747_PAD
|
||||
case SDLK_ESCAPE:
|
||||
new_btn = BUTTON_POWER;
|
||||
break;
|
||||
case SDLK_KP_PLUS:
|
||||
new_btn = BUTTON_VOL_UP;
|
||||
break;
|
||||
case SDLK_KP_MINUS:
|
||||
new_btn = BUTTON_VOL_DOWN;
|
||||
break;
|
||||
case SDLK_KP_ENTER:
|
||||
new_btn = BUTTON_MENU;
|
||||
break;
|
||||
#else
|
||||
#error No keymap defined!
|
||||
#endif /* CONFIG_KEYPAD */
|
||||
|
|
|
|||
|
|
@ -291,6 +291,12 @@
|
|||
#define UI_LCD_POSX 42 /* x position of lcd */
|
||||
#define UI_LCD_POSY 55 /* y position of lcd */
|
||||
|
||||
#elif defined(ONDA_VX747)
|
||||
#define UI_TITLE "Onda VX747"
|
||||
#define UI_WIDTH 340 /* width of GUI window */
|
||||
#define UI_HEIGHT 601 /* height of GUI window */
|
||||
#define UI_LCD_POSX 45 /* x position of lcd */
|
||||
#define UI_LCD_POSY 90 /* y position of lcd */
|
||||
|
||||
#else
|
||||
#error no UI defines
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue