From 5d96c3ba711f0a1b3fd71cad0764b56f0260df8d Mon Sep 17 00:00:00 2001 From: Maurus Cuelenaere Date: Thu, 17 Dec 2009 13:44:09 +0000 Subject: Enable backlight brightness in simulator git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24042 a1c6a512-1295-4272-9138-f99709370657 --- uisimulator/sdl/lcd-bitmap.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'uisimulator/sdl') diff --git a/uisimulator/sdl/lcd-bitmap.c b/uisimulator/sdl/lcd-bitmap.c index 3c73b6fc5d..0bd90196e4 100644 --- a/uisimulator/sdl/lcd-bitmap.c +++ b/uisimulator/sdl/lcd-bitmap.c @@ -149,11 +149,7 @@ void sim_backlight(int value) #endif } #else /* LCD_DEPTH > 8 */ - if (value > 0) { - SDL_SetAlpha(lcd_surface, 0, SDL_ALPHA_OPAQUE); /* full on */ - } else { - SDL_SetAlpha(lcd_surface, SDL_SRCALPHA, BACKLIGHT_OFF_ALPHA); - } + SDL_SetAlpha(lcd_surface, SDL_SRCALPHA, (value * 255) / 100); #endif /* LCD_DEPTH */ sdl_gui_update(lcd_surface, 0, 0, SIM_LCD_WIDTH, SIM_LCD_HEIGHT, -- cgit