123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220 |
- diff --git a/package/sdl/0003-add-SDL_NOKBD.patch b/package/sdl/0003-add-SDL_NOKBD.patch
- new file mode 100644
- index 0000000..d944555
- --- /dev/null
- +++ b/package/sdl/0003-add-SDL_NOKBD.patch
- @@ -0,0 +1,55 @@
- +diff --git a/src/video/fbcon/SDL_fbvideo.c b/src/video/fbcon/SDL_fbvideo.c
- +index 5e58809..81830b6 100644
- +--- a/src/video/fbcon/SDL_fbvideo.c
- ++++ b/src/video/fbcon/SDL_fbvideo.c
- +@@ -793,9 +793,11 @@ static int FB_VideoInit(_THIS, SDL_PixelFormat *vformat)
- + }
- +
- + /* Enable mouse and keyboard support */
- +- if ( FB_OpenKeyboard(this) < 0 ) {
- +- FB_VideoQuit(this);
- +- return(-1);
- ++ if (!SDL_getenv("SDL_NOKBD")){
- ++ if ( FB_OpenKeyboard(this) < 0 ) {
- ++ FB_VideoQuit(this);
- ++ return(-1);
- ++ }
- + }
- + if ( FB_OpenMouse(this) < 0 ) {
- + const char *sdl_nomouse;
- +@@ -944,7 +946,7 @@ static SDL_Surface *FB_SetVGA16Mode(_THIS, SDL_Surface *current,
- +
- + /* Set the terminal into graphics mode */
- + if ( FB_EnterGraphicsMode(this) < 0 ) {
- +- return(NULL);
- ++ if (!SDL_getenv("SDL_NOKBD")) return(NULL);
- + }
- +
- + /* Restore the original palette */
- +@@ -1009,7 +1011,7 @@ static SDL_Surface *FB_SetVideoMode(_THIS, SDL_Surface *current,
- +
- + /* Set the terminal into graphics mode */
- + if ( FB_EnterGraphicsMode(this) < 0 ) {
- +- return(NULL);
- ++ if (!SDL_getenv("SDL_NOKBD")) return(NULL);
- + }
- +
- + /* Restore the original palette */
- +@@ -1919,7 +1921,7 @@ static void FB_VideoQuit(_THIS)
- + SDL_memcpy(flip_address[0], flip_address[1], this->screen->pitch * this->screen->h);
- + }
- +
- +- if ( !dontClearPixels && this->screen->pixels && FB_InGraphicsMode(this) ) {
- ++ if ( (!dontClearPixels && this->screen->pixels && FB_InGraphicsMode(this)) || SDL_getenv("SDL_NOKBD") ) {
- + #if defined(__powerpc__) || defined(__ia64__) /* SIGBUS when using SDL_memset() ?? */
- + Uint8 *rowp = (Uint8 *)this->screen->pixels;
- + int left = this->screen->pitch*this->screen->h;
- +@@ -1968,7 +1970,7 @@ static void FB_VideoQuit(_THIS)
- + }
- +
- + /* Restore the original video mode and palette */
- +- if ( FB_InGraphicsMode(this) ) {
- ++ if ( FB_InGraphicsMode(this) || SDL_getenv("SDL_NOKBD") ) {
- + FB_RestorePalette(this);
- + ioctl(console_fd, FBIOPUT_VSCREENINFO, &saved_vinfo);
- + }
- diff --git a/package/sdl/0004-sdl-fbdev-blit32.patch b/package/sdl/0004-sdl-fbdev-blit32.patch
- new file mode 100644
- index 0000000..e06a57a
- --- /dev/null
- +++ b/package/sdl/0004-sdl-fbdev-blit32.patch
- @@ -0,0 +1,99 @@
- +diff --git a/src/video/fbcon/SDL_fbvideo.c b/src/video/fbcon/SDL_fbvideo.c
- +index 81830b6..1399140 100644
- +--- a/src/video/fbcon/SDL_fbvideo.c
- ++++ b/src/video/fbcon/SDL_fbvideo.c
- +@@ -165,6 +165,10 @@ static void FB_RestorePalette(_THIS);
- + static FB_bitBlit FB_blit16;
- + static FB_bitBlit FB_blit16blocked;
- +
- ++static FB_bitBlit FB_blit32;
- ++static FB_bitBlit FB_blit32blocked;
- ++
- ++
- + static int SDL_getpagesize(void)
- + {
- + #ifdef HAVE_GETPAGESIZE
- +@@ -1119,6 +1123,10 @@ static SDL_Surface *FB_SetVideoMode(_THIS, SDL_Surface *current,
- + blitFunc = (rotate == FBCON_ROTATE_NONE ||
- + rotate == FBCON_ROTATE_UD) ?
- + FB_blit16 : FB_blit16blocked;
- ++ } else if (vinfo.bits_per_pixel == 32) {
- ++ blitFunc = (rotate == FBCON_ROTATE_NONE ||
- ++ rotate == FBCON_ROTATE_UD) ?
- ++ FB_blit32 : FB_blit32blocked;
- + } else {
- + #ifdef FBCON_DEBUG
- + fprintf(stderr, "Init vinfo:\n");
- +@@ -1495,6 +1503,57 @@ static void FB_blit16blocked(Uint8 *byte_src_pos, int src_right_delta, int src_d
- + }
- + }
- +
- ++static void FB_blit32(Uint8 *byte_src_pos, int src_right_delta, int src_down_delta,
- ++ Uint8 *byte_dst_pos, int dst_linebytes, int width, int height)
- ++{
- ++ int w;
- ++ Uint32 *src_pos = (Uint32 *)byte_src_pos;
- ++ Uint32 *dst_pos = (Uint32 *)byte_dst_pos;
- ++
- ++ while (height) {
- ++ Uint32 *src = src_pos;
- ++ Uint32 *dst = dst_pos;
- ++ for (w = width; w != 0; w--) {
- ++ *dst = *src;
- ++ src += src_right_delta;
- ++ dst++;
- ++ }
- ++ dst_pos = (Uint32 *)((Uint8 *)dst_pos + dst_linebytes);
- ++ src_pos += src_down_delta;
- ++ height--;
- ++ }
- ++}
- ++
- ++#define BLOCKSIZE_W 32
- ++#define BLOCKSIZE_H 32
- ++
- ++static void FB_blit32blocked(Uint8 *byte_src_pos, int src_right_delta, int src_down_delta,
- ++ Uint8 *byte_dst_pos, int dst_linebytes, int width, int height)
- ++{
- ++ int w;
- ++ Uint32 *src_pos = (Uint32 *)byte_src_pos;
- ++ Uint32 *dst_pos = (Uint32 *)byte_dst_pos;
- ++
- ++ while (height > 0) {
- ++ Uint32 *src = src_pos;
- ++ Uint32 *dst = dst_pos;
- ++ for (w = width; w > 0; w -= BLOCKSIZE_W) {
- ++ FB_blit32((Uint8 *)src,
- ++ src_right_delta,
- ++ src_down_delta,
- ++ (Uint8 *)dst,
- ++ dst_linebytes,
- ++ min(w, BLOCKSIZE_W),
- ++ min(height, BLOCKSIZE_H));
- ++ src += src_right_delta * BLOCKSIZE_W;
- ++ dst += BLOCKSIZE_W;
- ++ }
- ++ dst_pos = (Uint32 *)((Uint8 *)dst_pos + dst_linebytes * BLOCKSIZE_H);
- ++ src_pos += src_down_delta * BLOCKSIZE_H;
- ++ height -= BLOCKSIZE_H;
- ++ }
- ++}
- ++
- + static void FB_DirectUpdate(_THIS, int numrects, SDL_Rect *rects)
- + {
- + int width = cache_vinfo.xres;
- +@@ -1507,10 +1566,10 @@ static void FB_DirectUpdate(_THIS, int numrects, SDL_Rect *rects)
- + return;
- + }
- +
- +- if (cache_vinfo.bits_per_pixel != 16) {
- +- SDL_SetError("Shadow copy only implemented for 16 bpp");
- +- return;
- +- }
- ++// if (cache_vinfo.bits_per_pixel != 16) {
- ++// SDL_SetError("Shadow copy only implemented for 16 bpp");
- ++// return;
- ++// }
- +
- + for (i = 0; i < numrects; i++) {
- + int x1, y1, x2, y2;
- diff --git a/package/sdl/Config.in b/package/sdl/Config.in
- index 9f1e34d..65ac8a2 100644
- --- a/package/sdl/Config.in
- +++ b/package/sdl/Config.in
- @@ -17,6 +17,10 @@ config BR2_PACKAGE_SDL_DIRECTFB
- bool "SDL DirectFB video driver"
- depends on BR2_PACKAGE_DIRECTFB
-
- +config BR2_PACKAGE_SDL_QTOPIA
- + bool "SDL Qtopia video driver"
- + depends on BR2_PACKAGE_QT
- +
- config BR2_PACKAGE_SDL_X11
- bool "SDL X11 video driver"
- depends on BR2_PACKAGE_XORG7
- diff --git a/package/sdl/sdl.mk b/package/sdl/sdl.mk
- index 7389cd3..38b4b97 100644
- --- a/package/sdl/sdl.mk
- +++ b/package/sdl/sdl.mk
- @@ -7,10 +7,8 @@
- SDL_VERSION = 1.2.15
- SDL_SOURCE = SDL-$(SDL_VERSION).tar.gz
- SDL_SITE = http://www.libsdl.org/release
- -SDL_LICENSE = LGPL-2.1+
- +SDL_LICENSE = LGPLv2.1+
- SDL_LICENSE_FILES = COPYING
- -SDL_CPE_ID_VENDOR = libsdl
- -SDL_CPE_ID_PRODUCT = simple_directmedia_layer
- SDL_INSTALL_STAGING = YES
-
- # we're patching configure.in, but package cannot autoreconf with our version of
- @@ -25,8 +23,6 @@ HOST_SDL_PRE_CONFIGURE_HOOKS += SDL_RUN_AUTOGEN
- SDL_DEPENDENCIES += host-automake host-autoconf host-libtool
- HOST_SDL_DEPENDENCIES += host-automake host-autoconf host-libtool
-
- -SDL_CONF_OPTS += --enable-video-qtopia=no
- -
- ifeq ($(BR2_PACKAGE_SDL_FBCON),y)
- SDL_CONF_OPTS += --enable-video-fbcon=yes
- else
- @@ -41,6 +37,13 @@ else
- SDL_CONF_OPTS += --enable-video-directfb=no
- endif
-
- +ifeq ($(BR2_PACKAGE_SDL_QTOPIA),y)
- +SDL_CONF_OPTS += --enable-video-qtopia=yes
- +SDL_DEPENDENCIES += qt
- +else
- +SDL_CONF_OPTS += --enable-video-qtopia=no
- +endif
- +
- ifeq ($(BR2_PACKAGE_SDL_X11),y)
- SDL_CONF_OPTS += --enable-video-x11=yes
- SDL_DEPENDENCIES += \
|