summaryrefslogtreecommitdiffstats
path: root/uisimulator/sdl
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator/sdl')
-rwxr-xr-xuisimulator/sdl/UI-ondavx747.bmpbin0 -> 613076 bytes
-rw-r--r--uisimulator/sdl/button.c29
-rw-r--r--uisimulator/sdl/uisdl.h6
3 files changed, 23 insertions, 12 deletions
diff --git a/uisimulator/sdl/UI-ondavx747.bmp b/uisimulator/sdl/UI-ondavx747.bmp
new file mode 100755
index 0000000000..364003d720
--- /dev/null
+++ b/uisimulator/sdl/UI-ondavx747.bmp
Binary files differ
diff --git a/uisimulator/sdl/button.c b/uisimulator/sdl/button.c
index 6402c75d55..c32c0a8c6a 100644
--- a/uisimulator/sdl/button.c
+++ b/uisimulator/sdl/button.c
@@ -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 */
diff --git a/uisimulator/sdl/uisdl.h b/uisimulator/sdl/uisdl.h
index 6cb382ce8b..3868158938 100644
--- a/uisimulator/sdl/uisdl.h
+++ b/uisimulator/sdl/uisdl.h
@@ -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