Minor changes and fix HAVE_LCD_FLIP
authorThomas Martitz <thomas.martitz@student.htw-berlin.de>
Sat, 15 May 2010 20:20:57 +0000 (15 22:20 +0200)
committerThomas Martitz <thomas.martitz@student.htw-berlin.de>
Sat, 15 May 2010 20:20:57 +0000 (15 22:20 +0200)
firmware/SOURCES
firmware/drivers/audio/sdl.c
firmware/drivers/button.c
firmware/export/config/sim.h
firmware/target/hosted/sdl/button-sdl.c
uisimulator/common/stubs.c

index b1e1025..47249a2 100644 (file)
@@ -310,7 +310,9 @@ drivers/audio/uda1341.c
 #endif /* defined(HAVE_*) */
 #elif defined(HAVE_SDL_AUDIO)
 drivers/audio/sdl.c
+#if CONFIG_CODEC == SWCODEC
 target/hosted/sdl/pcm-sdl.c
+#endif
 #endif /* !defined(SIMULATOR) && !defined(BOOTLOADER) */
 
 /* USB Stack */
index 9bf3d28..c063192 100644 (file)
@@ -32,8 +32,12 @@ extern void pcm_set_mixer_volume(int);
 
 void audiohw_set_volume(int volume)
 {
+#if CONFIG_CODEC == SWCODEC
     pcm_set_mixer_volume(
         SDL_MIX_MAXVOLUME * ((volume - VOLUME_MIN) / 10) / (VOLUME_RANGE / 10));
+#else
+    (void)volume;
+#endif
 }
 
 const struct sound_settings_info audiohw_settings[] = {
index 100957b..f116ad6 100644 (file)
@@ -429,7 +429,6 @@ void button_init(void)
     tick_add_task(button_tick);
 }
 
-#ifndef SIMULATOR
 #ifdef BUTTON_DRIVER_CLOSE
 void button_close(void)
 {
@@ -443,9 +442,10 @@ void button_close(void)
  */
 static int button_flip(int button)
 {
-    int newbutton;
+    int newbutton = button;
 
-    newbutton = button &
+#ifndef SIMULATOR
+    newbutton &=
         ~(BUTTON_LEFT | BUTTON_RIGHT
 #if defined(BUTTON_UP) && defined(BUTTON_DOWN)
         | BUTTON_UP | BUTTON_DOWN
@@ -503,7 +503,7 @@ static int button_flip(int button)
     if (button & BUTTON_PREV)
         newbutton |= BUTTON_NEXT;
 #endif
-
+#endif /* !SIMULATOR */
     return newbutton;
 }
 
@@ -523,7 +523,6 @@ void button_set_flip(bool flip)
     }
 }
 #endif /* HAVE_LCD_FLIP */
-#endif /* SIMULATOR */
 
 #ifdef HAVE_BACKLIGHT
 void set_backlight_filter_keypress(bool value)
index 06acd5a..d65b0fb 100644 (file)
@@ -80,6 +80,8 @@
 
 #undef HAVE_SPEAKER
 
+#undef BUTTON_DRIVER_CLOSE
+
 #if     CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_SW_HW_REG
 #undef  CONFIG_BACKLIGHT_FADING
         /* simulate SW_SETTING, as we handle sdl very similary */
index a32872d..51ba8cf 100644 (file)
@@ -173,7 +173,6 @@ static void gui_message_loop(void)
 
             case SDL_QUIT:
             {
-                printf("EXIT\n");
                 exit(EXIT_SUCCESS);
                 break;
             }
index adac839..d4a9af1 100644 (file)
@@ -314,11 +314,6 @@ void cpu_sleep(bool enabled)
     (void)enabled;
 }
 
-void button_set_flip(bool yesno)
-{
-    (void)yesno;
-}
-
 #ifdef HAVE_TOUCHPAD_SENSITIVITY_SETTING
 void touchpad_set_sensitivity(int level)
 {