forked from len0rd/rockbox
Move screendump from apps to firmware, solving two nasty firmware-to-apps calls. This required to move the filename creation functions as well. * Fix bug in the BMP header of Clip screendumps. * Add remote screendump for targets with an LCD remote. * Simplify some ifdefs and rename a macro in the sim.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19967 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
eddb5680f9
commit
11ad7b4bc8
15 changed files with 181 additions and 409 deletions
|
|
@ -22,7 +22,7 @@
|
|||
#include "debug.h"
|
||||
#include "uisdl.h"
|
||||
#include "lcd-sdl.h"
|
||||
#include "misc.h"
|
||||
#include "screendump.h"
|
||||
|
||||
SDL_Surface* lcd_surface;
|
||||
|
||||
|
|
@ -166,14 +166,12 @@ void sim_lcd_init(void)
|
|||
SIM_LCD_WIDTH * display_zoom,
|
||||
SIM_LCD_HEIGHT * display_zoom,
|
||||
LCD_DEPTH, 0, 0, 0, 0);
|
||||
#else
|
||||
#elif LCD_DEPTH <= 8
|
||||
lcd_surface = SDL_CreateRGBSurface(SDL_SWSURFACE,
|
||||
SIM_LCD_WIDTH * display_zoom,
|
||||
SIM_LCD_HEIGHT * display_zoom,
|
||||
8, 0, 0, 0, 0);
|
||||
#endif
|
||||
|
||||
#if LCD_DEPTH <= 8
|
||||
#ifdef HAVE_BACKLIGHT
|
||||
sdl_set_gradient(lcd_surface, &lcd_bl_color_dark,
|
||||
&lcd_bl_color_bright, 0, NUM_SHADES);
|
||||
|
|
@ -189,7 +187,7 @@ void sim_lcd_init(void)
|
|||
&lcd_color2_bright, NUM_SHADES, NUM_SHADES);
|
||||
#endif
|
||||
#endif /* !HAVE_BACKLIGHT */
|
||||
#endif /* LCD_DEPTH < 8 */
|
||||
#endif /* LCD_DEPTH */
|
||||
}
|
||||
|
||||
#if LCD_DEPTH < 8
|
||||
|
|
|
|||
|
|
@ -22,7 +22,8 @@
|
|||
#include "debug.h"
|
||||
#include "lcd.h"
|
||||
#include "lcd-charcell.h"
|
||||
#include "misc.h"
|
||||
#inclued "screendump.h"
|
||||
#include "misc.h"
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
#include "uisdl.h"
|
||||
#include "lcd-sdl.h"
|
||||
#include "lcd-remote-bitmap.h"
|
||||
#include "misc.h"
|
||||
#include "screendump.h"
|
||||
|
||||
SDL_Surface *remote_surface;
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ SDL_Color remote_color_bright = {RED_CMP(LCD_REMOTE_BRIGHTCOLOR),
|
|||
GREEN_CMP(LCD_REMOTE_BRIGHTCOLOR),
|
||||
BLUE_CMP(LCD_REMOTE_BRIGHTCOLOR), 0};
|
||||
|
||||
#define GRADIENT_MAX 128
|
||||
#define NUM_SHADES 129
|
||||
|
||||
#if LCD_REMOTE_DEPTH == 2
|
||||
/* Only defined for positive, non-split LCD for now */
|
||||
|
|
@ -49,7 +49,7 @@ static const unsigned char colorindex[4] = {128, 85, 43, 0};
|
|||
static unsigned long get_lcd_remote_pixel(int x, int y)
|
||||
{
|
||||
#if LCD_REMOTE_DEPTH == 1
|
||||
return lcd_remote_framebuffer[y/8][x] & (1 << (y & 7)) ? 0 : GRADIENT_MAX;
|
||||
return lcd_remote_framebuffer[y/8][x] & (1 << (y & 7)) ? 0 : (NUM_SHADES-1);
|
||||
#elif LCD_REMOTE_DEPTH == 2
|
||||
#if LCD_REMOTE_PIXELFORMAT == VERTICAL_INTERLEAVED
|
||||
unsigned bits = (lcd_remote_framebuffer[y/8][x] >> (y & 7)) & 0x0101;
|
||||
|
|
@ -76,10 +76,10 @@ void sim_remote_backlight(int value)
|
|||
{
|
||||
if (value > 0) {
|
||||
sdl_set_gradient(remote_surface, &remote_bl_color_dark,
|
||||
&remote_bl_color_bright, 0, GRADIENT_MAX+1);
|
||||
&remote_bl_color_bright, 0, NUM_SHADES);
|
||||
} else {
|
||||
sdl_set_gradient(remote_surface, &remote_color_dark,
|
||||
&remote_color_bright, 0, GRADIENT_MAX+1);
|
||||
&remote_color_bright, 0, NUM_SHADES);
|
||||
}
|
||||
|
||||
sdl_gui_update(remote_surface, 0, 0, LCD_REMOTE_WIDTH, LCD_REMOTE_HEIGHT,
|
||||
|
|
@ -97,6 +97,6 @@ void sim_lcd_remote_init(void)
|
|||
8, 0, 0, 0, 0);
|
||||
|
||||
sdl_set_gradient(remote_surface, &remote_bl_color_dark,
|
||||
&remote_bl_color_bright, 0, GRADIENT_MAX+1);
|
||||
&remote_bl_color_bright, 0, NUM_SHADES);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue