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)
downloadrockbox-71d73fd470e339adff65aff0db6a44d1d6418b31.tar.gz
rockbox-71d73fd470e339adff65aff0db6a44d1d6418b31.zip
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)
1771#endif /* CONFIG_TUNER */ 1771#endif /* CONFIG_TUNER */
1772#endif /* !SIMULATOR */ 1772#endif /* !SIMULATOR */
1773 1773
1774#ifdef HAVE_LCD_BITMAP 1774#if defined(HAVE_LCD_BITMAP) && !defined(APPLICATION)
1775extern bool do_screendump_instead_of_usb; 1775extern bool do_screendump_instead_of_usb;
1776 1776
1777static bool dbg_screendump(void) 1777static bool dbg_screendump(void)
@@ -2057,8 +2057,10 @@ static const struct the_menu_item menuitems[] = {
2057#if (CONFIG_PLATFORM & PLATFORM_NATIVE) 2057#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
2058 { "View battery", view_battery }, 2058 { "View battery", view_battery },
2059#endif 2059#endif
2060#ifndef APPLICATION
2060 { "Screendump", dbg_screendump }, 2061 { "Screendump", dbg_screendump },
2061#endif 2062#endif
2063#endif
2062#if (CONFIG_PLATFORM & PLATFORM_NATIVE) 2064#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
2063 { "View HW info", dbg_hw_info }, 2065 { "View HW info", dbg_hw_info },
2064#endif 2066#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 @@
131#endif 131#endif
132 132
133#if (CONFIG_PLATFORM & (PLATFORM_SDL|PLATFORM_MAEMO|PLATFORM_PANDORA)) 133#if (CONFIG_PLATFORM & (PLATFORM_SDL|PLATFORM_MAEMO|PLATFORM_PANDORA))
134#ifdef SIMULATOR
134#include "sim_tasks.h" 135#include "sim_tasks.h"
136#endif
135#include "system-sdl.h" 137#include "system-sdl.h"
136#define HAVE_ARGV_MAIN 138#define HAVE_ARGV_MAIN
137/* Don't use SDL_main on windows -> no more stdio redirection */ 139/* Don't use SDL_main on windows -> no more stdio redirection */
@@ -360,7 +362,7 @@ static void init(void)
360 button_init(); 362 button_init();
361 powermgmt_init(); 363 powermgmt_init();
362 backlight_init(); 364 backlight_init();
363#if (CONFIG_PLATFORM & (PLATFORM_SDL|PLATFORM_MAEMO|PLATFORM_PANDORA)) 365#ifdef SIMULATOR
364 sim_tasks_init(); 366 sim_tasks_init();
365#endif 367#endif
366#if (CONFIG_PLATFORM & PLATFORM_ANDROID) 368#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)
309{ 309{
310 int new_btn = 0; 310 int new_btn = 0;
311 static bool usb_connected = false; 311 static bool usb_connected = false;
312 if (usb_connected && key != USB_KEY)
313 return;
314 switch (key) 312 switch (key)
315 { 313 {
314#ifdef SIMULATOR
316 case USB_KEY: 315 case USB_KEY:
317 if (!pressed) 316 if (!pressed)
318 { 317 {
@@ -320,7 +319,7 @@ static void button_event(int key, bool pressed)
320 sim_trigger_usb(usb_connected); 319 sim_trigger_usb(usb_connected);
321 } 320 }
322 return; 321 return;
323 322#endif
324#if (CONFIG_PLATFORM & PLATFORM_PANDORA) 323#if (CONFIG_PLATFORM & PLATFORM_PANDORA)
325 case SDLK_LCTRL: 324 case SDLK_LCTRL:
326 /* Will post SDL_USEREVENT in shutdown_hw() if successful. */ 325 /* Will post SDL_USEREVENT in shutdown_hw() if successful. */
@@ -372,6 +371,7 @@ static void button_event(int key, bool pressed)
372 } 371 }
373 break; 372 break;
374#endif 373#endif
374#ifndef APPLICATION
375 case SDLK_KP0: 375 case SDLK_KP0:
376 case SDLK_F5: 376 case SDLK_F5:
377 if(pressed) 377 if(pressed)
@@ -380,6 +380,7 @@ static void button_event(int key, bool pressed)
380 return; 380 return;
381 } 381 }
382 break; 382 break;
383#endif
383#ifdef HAVE_TOUCHSCREEN 384#ifdef HAVE_TOUCHSCREEN
384 case SDLK_F4: 385 case SDLK_F4:
385 if(pressed) 386 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
5lcd-playersim.c 5lcd-playersim.c
6sim_icons.c 6sim_icons.c
7#endif 7#endif
8sim_tasks.c
8fmradio.c 9fmradio.c
9backlight-sim.c 10backlight-sim.c
10#endif 11#endif
11 12
12io.c 13io.c
13sim_tasks.c
14/* this is still needed for application since it has some stubs */ 14/* this is still needed for application since it has some stubs */
15#if !(CONFIG_PLATFORM & PLATFORM_MAEMO) 15#if !(CONFIG_PLATFORM & PLATFORM_MAEMO)
16powermgmt-sim.c 16powermgmt-sim.c