summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2011-11-17 19:52:59 +0000
committerThomas Martitz <kugel@rockbox.org>2011-11-17 19:52:59 +0000
commit71d73fd470e339adff65aff0db6a44d1d6418b31 (patch)
tree74f8d82b2eb72dd229c33b925b37976327901aaf
parent7e211ff9d14aa732d1f54271f8a46ffc2e1b6342 (diff)
Remove sim_tasks from the sdl application build.
This unfortunately removes the screendump feature, but usually there are better desktop apps for that. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31011 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/debug_menu.c4
-rw-r--r--apps/main.c4
-rw-r--r--firmware/target/hosted/sdl/button-sdl.c7
-rw-r--r--uisimulator/common/SOURCES2
4 files changed, 11 insertions, 6 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 809644b3d2..79a0752c4a 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -1771,7 +1771,7 @@ static bool dbg_fm_radio(void)
#endif /* CONFIG_TUNER */
#endif /* !SIMULATOR */
-#ifdef HAVE_LCD_BITMAP
+#if defined(HAVE_LCD_BITMAP) && !defined(APPLICATION)
extern bool do_screendump_instead_of_usb;
static bool dbg_screendump(void)
@@ -2057,8 +2057,10 @@ static const struct the_menu_item menuitems[] = {
#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
{ "View battery", view_battery },
#endif
+#ifndef APPLICATION
{ "Screendump", dbg_screendump },
#endif
+#endif
#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
{ "View HW info", dbg_hw_info },
#endif
diff --git a/apps/main.c b/apps/main.c
index 9d83c62965..50da787b17 100644
--- a/apps/main.c
+++ b/apps/main.c
@@ -131,7 +131,9 @@
#endif
#if (CONFIG_PLATFORM & (PLATFORM_SDL|PLATFORM_MAEMO|PLATFORM_PANDORA))
+#ifdef SIMULATOR
#include "sim_tasks.h"
+#endif
#include "system-sdl.h"
#define HAVE_ARGV_MAIN
/* Don't use SDL_main on windows -> no more stdio redirection */
@@ -360,7 +362,7 @@ static void init(void)
button_init();
powermgmt_init();
backlight_init();
-#if (CONFIG_PLATFORM & (PLATFORM_SDL|PLATFORM_MAEMO|PLATFORM_PANDORA))
+#ifdef SIMULATOR
sim_tasks_init();
#endif
#if (CONFIG_PLATFORM & PLATFORM_ANDROID)
diff --git a/firmware/target/hosted/sdl/button-sdl.c b/firmware/target/hosted/sdl/button-sdl.c
index 837cba4dc4..335685a45f 100644
--- a/firmware/target/hosted/sdl/button-sdl.c
+++ b/firmware/target/hosted/sdl/button-sdl.c
@@ -309,10 +309,9 @@ static void button_event(int key, bool pressed)
{
int new_btn = 0;
static bool usb_connected = false;
- if (usb_connected && key != USB_KEY)
- return;
switch (key)
{
+#ifdef SIMULATOR
case USB_KEY:
if (!pressed)
{
@@ -320,7 +319,7 @@ static void button_event(int key, bool pressed)
sim_trigger_usb(usb_connected);
}
return;
-
+#endif
#if (CONFIG_PLATFORM & PLATFORM_PANDORA)
case SDLK_LCTRL:
/* Will post SDL_USEREVENT in shutdown_hw() if successful. */
@@ -372,6 +371,7 @@ static void button_event(int key, bool pressed)
}
break;
#endif
+#ifndef APPLICATION
case SDLK_KP0:
case SDLK_F5:
if(pressed)
@@ -380,6 +380,7 @@ static void button_event(int key, bool pressed)
return;
}
break;
+#endif
#ifdef HAVE_TOUCHSCREEN
case SDLK_F4:
if(pressed)
diff --git a/uisimulator/common/SOURCES b/uisimulator/common/SOURCES
index 2c921ed7ad..1e042afdc5 100644
--- a/uisimulator/common/SOURCES
+++ b/uisimulator/common/SOURCES
@@ -5,12 +5,12 @@ font-player.c
lcd-playersim.c
sim_icons.c
#endif
+sim_tasks.c
fmradio.c
backlight-sim.c
#endif
io.c
-sim_tasks.c
/* this is still needed for application since it has some stubs */
#if !(CONFIG_PLATFORM & PLATFORM_MAEMO)
powermgmt-sim.c