source:
scripts_home/scripts/untested/blfs-patches/patch-libsdl1.2-libcaca0.7.patch@
1c9c5c3
Last change on this file since 1c9c5c3 was 1c9c5c3, checked in by , 19 years ago | |
---|---|
|
|
File size: 21.4 KB |
-
libsdl1.2-1.2.
Submitted By: Ryan Oliver <ryan.oliver@pha.com.au> Date: 2005-05-22 Initial Package Version: 1.2.6 Upstream Status: unknown Origin: libcaca website http://sam.zoy.org/libcaca/patch-libsdl1.2-libcaca0.7.diff Description: Adds libcaca support to SDL $Id: patch-libsdl1.2-libcaca0.7.diff 809 2005-03-23 11:07:40Z sam $ diff -puriN -x Makefile -x '*.la' libsdl1.2-1.2.6/configure.in libsdl1.2-1.2.6-caca/configure.in
old new CheckAAlib() 952 952 fi 953 953 } 954 954 955 dnl Find the libcaca includes 956 CheckCaca() 957 { 958 AC_ARG_ENABLE(video-caca, 959 [ --enable-video-caca use libcaca video driver [default=no]], 960 , enable_video_caca=no) 961 if test x$enable_video = xyes -a x$enable_video_caca = xyes; then 962 AC_MSG_CHECKING(for libcaca support) 963 video_caca=no 964 AC_TRY_COMPILE([ 965 #include <caca.h> 966 ],[ 967 ],[ 968 video_caca=yes 969 ]) 970 AC_MSG_RESULT($video_caca) 971 if test x$video_caca = xyes; then 972 CFLAGS="$CFLAGS -DENABLE_CACA `caca-config --cflags`" 973 SYSTEM_LIBS="$SYSTEM_LIBS `caca-config --plugin-libs`" 974 975 VIDEO_SUBDIRS="$VIDEO_SUBDIRS caca" 976 VIDEO_DRIVERS="$VIDEO_DRIVERS caca/libvideo_caca.la" 977 fi 978 fi 979 } 980 955 981 dnl Set up the Atari Xbios driver 956 982 CheckAtariXbiosVideo() 957 983 { … … case "$target" in 1738 1764 CheckGGI 1739 1765 CheckSVGA 1740 1766 CheckAAlib 1767 CheckCaca 1741 1768 CheckQtopia 1742 1769 CheckPicoGUI 1743 1770 CheckOpenGL … … case "$target" in 1819 1846 CheckDGA 1820 1847 CheckSVGA 1821 1848 CheckAAlib 1849 CheckCaca 1822 1850 CheckOpenGL 1823 1851 CheckPTHREAD 1824 1852 # Set up files for the main() stub … … case "$target" in 1865 1893 CheckDGA 1866 1894 CheckSVGA 1867 1895 CheckAAlib 1896 CheckCaca 1868 1897 CheckOpenGL 1869 1898 CheckPTHREAD 1870 1899 CheckUSBHID … … case "$target" in 1903 1932 CheckNAS 1904 1933 CheckX11 1905 1934 CheckAAlib 1935 CheckCaca 1906 1936 CheckOpenGL 1907 1937 CheckPTHREAD 1908 1938 CheckUSBHID … … case "$target" in 1945 1975 CheckNAS 1946 1976 CheckX11 1947 1977 CheckAAlib 1978 CheckCaca 1948 1979 CheckOpenGL 1949 1980 CheckPTHREAD 1950 1981 CheckUSBHID … … case "$target" in 1988 2019 CheckNAS 1989 2020 CheckX11 1990 2021 CheckAAlib 2022 CheckCaca 1991 2023 CheckOpenGL 1992 2024 CheckPTHREAD 1993 2025 # Set up files for the main() stub … … case "$target" in 2031 2063 CheckNAS 2032 2064 CheckX11 2033 2065 CheckAAlib 2066 CheckCaca 2034 2067 CheckOpenGL 2035 2068 CheckPTHREAD 2036 2069 # Set up files for the main() stub … … case "$target" in 2071 2104 CheckNAS 2072 2105 CheckX11 2073 2106 CheckAAlib 2107 CheckCaca 2074 2108 CheckOpenGL 2075 2109 CheckPTHREAD 2076 2110 # Set up files for the main() stub … … case "$target" in 2123 2157 CheckX11 2124 2158 CheckGGI 2125 2159 CheckAAlib 2160 CheckCaca 2126 2161 CheckOpenGL 2127 2162 CheckPTHREAD 2128 2163 # Set up files for the main() stub … … case "$target" in 2164 2199 CheckX11 2165 2200 CheckGGI 2166 2201 CheckAAlib 2202 CheckCaca 2167 2203 CheckOpenGL 2168 2204 CheckPTHREAD 2169 2205 # Set up files for the main() stub … … case "$target" in 2202 2238 CheckX11 2203 2239 CheckGGI 2204 2240 CheckAAlib 2241 CheckCaca 2205 2242 CheckOpenGL 2206 2243 CheckPTHREAD 2207 2244 SDL_LIBS="$SDL_LIBS -lrt" … … src/video/Makefile 2709 2746 src/video/aalib/Makefile 2710 2747 src/video/ataricommon/Makefile 2711 2748 src/video/bwindow/Makefile 2749 src/video/caca/Makefile 2712 2750 src/video/cybergfx/Makefile 2713 2751 src/video/dc/Makefile 2714 2752 src/video/dga/Makefile -
src/video/Makefile.am
diff -puriN -x Makefile -x '*.la' libsdl1.2-1.2.6/src/video/Makefile.am libsdl1.2-1.2.6-caca/src/video/Makefile.am
old new noinst_LTLIBRARIES = libvideo.la 5 5 6 6 # Define which subdirectories need to be built 7 7 SUBDIRS = @VIDEO_SUBDIRS@ 8 DIST_SUBDIRS = dummy x11 dga nanox fbcon directfb vgl svga ggi aalib \8 DIST_SUBDIRS = dummy x11 dga nanox fbcon directfb vgl svga ggi aalib caca \ 9 9 wincommon windib windx5 \ 10 10 maccommon macdsp macrom riscos quartz \ 11 11 bwindow ps2gs photon cybergfx epoc picogui \ -
src/video/SDL_sysvideo.h
diff -puriN -x Makefile -x '*.la' libsdl1.2-1.2.6/src/video/SDL_sysvideo.h libsdl1.2-1.2.6-caca/src/video/SDL_sysvideo.h
old new extern VideoBootStrap SVGALIB_bootstrap; 359 359 #ifdef ENABLE_AALIB 360 360 extern VideoBootStrap AALIB_bootstrap; 361 361 #endif 362 #ifdef ENABLE_CACA 363 extern VideoBootStrap Caca_bootstrap; 364 #endif 362 365 #ifdef ENABLE_WINDIB 363 366 extern VideoBootStrap WINDIB_bootstrap; 364 367 #endif -
src/video/SDL_video.c
diff -puriN -x Makefile -x '*.la' libsdl1.2-1.2.6/src/video/SDL_video.c libsdl1.2-1.2.6-caca/src/video/SDL_video.c
old new static VideoBootStrap *bootstrap[] = { 78 78 #ifdef ENABLE_AALIB 79 79 &AALIB_bootstrap, 80 80 #endif 81 #ifdef ENABLE_CACA 82 &Caca_bootstrap, 83 #endif 81 84 #ifdef ENABLE_DIRECTX 82 85 &DIRECTX_bootstrap, 83 86 #endif -
src/video/caca/Makefile.am
diff -puriN -x Makefile -x '*.la' libsdl1.2-1.2.6/src/video/caca/Makefile.am libsdl1.2-1.2.6-caca/src/video/caca/Makefile.am
old new 1 2 ## Makefile.am for SDL using the libcaca video driver 3 4 noinst_LTLIBRARIES = libvideo_caca.la 5 libvideo_caca_la_SOURCES = $(CACA_SRCS) 6 7 # The SDL libcaca video driver sources 8 CACA_SRCS = \ 9 SDL_cacavideo.h \ 10 SDL_cacaevents.c \ 11 SDL_cacaevents_c.h \ 12 SDL_cacavideo.c 13 -
src/video/caca/SDL_cacaevents.c
diff -puriN -x Makefile -x '*.la' libsdl1.2-1.2.6/src/video/caca/SDL_cacaevents.c libsdl1.2-1.2.6-caca/src/video/caca/SDL_cacaevents.c
old new 1 /* 2 SDL - Simple DirectMedia Layer 3 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga 4 5 This library is free software; you can redistribute it and/or 6 modify it under the terms of the GNU Library General Public 7 License as published by the Free Software Foundation; either 8 version 2 of the License, or (at your option) any later version. 9 10 This library is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 Library General Public License for more details. 14 15 You should have received a copy of the GNU Library General Public 16 License along with this library; if not, write to the Free 17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 19 Sam Lantinga 20 slouken@libsdl.org 21 */ 22 23 #ifdef SAVE_RCSID 24 static char rcsid = 25 "@(#) $Id: patch-libsdl1.2-libcaca0.7.diff 809 2005-03-23 11:07:40Z sam $"; 26 #endif 27 28 #include <stdio.h> 29 30 #include <caca.h> 31 32 #include "SDL.h" 33 #include "SDL_sysevents.h" 34 #include "SDL_events_c.h" 35 #include "SDL_cacavideo.h" 36 #include "SDL_cacaevents_c.h" 37 38 void Caca_PumpEvents(_THIS) 39 { 40 int posted = 0; 41 int event; 42 SDL_keysym keysym; 43 44 if( ! this->screen ) /* Wait till we got the screen initialised */ 45 return; 46 47 do { 48 posted = 0; 49 50 /* Get libcaca event */ 51 SDL_mutexP(Caca_mutex); 52 event = caca_get_event(CACA_EVENT_ANY); 53 SDL_mutexV(Caca_mutex); 54 55 if ( event & (CACA_EVENT_KEY_PRESS | CACA_EVENT_KEY_RELEASE)) { 56 int key; 57 switch ( event & 0xffffff ) 58 { 59 case CACA_KEY_LEFT: key = SDLK_LEFT; break; 60 case CACA_KEY_RIGHT: key = SDLK_RIGHT; break; 61 case CACA_KEY_UP: key = SDLK_UP; break; 62 case CACA_KEY_DOWN: key = SDLK_DOWN; break; 63 default: key = event & 0xff; break; 64 } 65 /* Key pressed */ 66 /* printf("Key pressed: %d (%c)\n", key, key); */ 67 keysym.scancode = key; 68 keysym.sym = key; 69 keysym.mod = KMOD_NONE; 70 keysym.unicode = 0; 71 if ( SDL_TranslateUNICODE ) { 72 keysym.unicode = key; 73 } 74 posted += SDL_PrivateKeyboard((event & CACA_EVENT_KEY_PRESS) ? SDL_PRESSED : SDL_RELEASED, &keysym); 75 } 76 else if ( event & (CACA_EVENT_MOUSE_PRESS | CACA_EVENT_MOUSE_RELEASE) ) { 77 /* FIXME: we currently ignore the button type! */ 78 int button = event & 0x00ffffff; 79 if ( button > 3 ) { 80 button = 1; 81 } 82 posted += SDL_PrivateMouseButton((event & CACA_EVENT_MOUSE_PRESS) ? SDL_PRESSED : SDL_RELEASED, button, 0, 0); 83 } 84 else if ( event & CACA_EVENT_MOUSE_MOTION ) { 85 int new_x = 0, new_y = 0; 86 new_x = ((event & 0x00fff000) >> 12) * Caca_w / caca_get_width(); 87 new_y = ((event & 0x00000fff) >> 0) * Caca_h / caca_get_height(); 88 posted += SDL_PrivateMouseMotion(0, 0, new_x, new_y); 89 } 90 } while ( posted ); 91 } 92 93 void Caca_InitOSKeymap(_THIS) 94 { 95 return; 96 } 97 -
src/video/caca/SDL_cacaevents_c.h
diff -puriN -x Makefile -x '*.la' libsdl1.2-1.2.6/src/video/caca/SDL_cacaevents_c.h libsdl1.2-1.2.6-caca/src/video/caca/SDL_cacaevents_c.h
old new 1 /* 2 SDL - Simple DirectMedia Layer 3 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Sam Lantinga 4 5 This library is free software; you can redistribute it and/or 6 modify it under the terms of the GNU Library General Public 7 License as published by the Free Software Foundation; either 8 version 2 of the License, or (at your option) any later version. 9 10 This library is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 Library General Public License for more details. 14 15 You should have received a copy of the GNU Library General Public 16 License along with this library; if not, write to the Free 17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 19 Sam Lantinga 20 slouken@libsdl.org 21 */ 22 23 #ifdef SAVE_RCSID 24 static char rcsid = 25 "@(#) $Id: patch-libsdl1.2-libcaca0.7.diff 809 2005-03-23 11:07:40Z sam $"; 26 #endif 27 28 #include "SDL_cacavideo.h" 29 30 /* Variables and functions exported by SDL_sysevents.c to other parts 31 of the native video subsystem (SDL_sysvideo.c) 32 */ 33 extern void Caca_PumpEvents(_THIS); 34 extern void Caca_InitOSKeymap(_THIS); -
src/video/caca/SDL_cacavideo.c
diff -puriN -x Makefile -x '*.la' libsdl1.2-1.2.6/src/video/caca/SDL_cacavideo.c libsdl1.2-1.2.6-caca/src/video/caca/SDL_cacavideo.c
old new 1 /* 2 SDL - Simple DirectMedia Layer 3 Copyright (C) 2003 Sam Hocevar 4 5 This library is free software; you can redistribute it and/or 6 modify it under the terms of the GNU Library General Public 7 License as published by the Free Software Foundation; either 8 version 2 of the License, or (at your option) any later version. 9 10 This library is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 Library General Public License for more details. 14 15 You should have received a copy of the GNU Library General Public 16 License along with this library; if not, write to the Free 17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 19 Sam Hocevar 20 sam@zoy.org 21 */ 22 23 #ifdef SAVE_RCSID 24 static char rcsid = 25 "@(#) $Id: patch-libsdl1.2-libcaca0.7.diff 809 2005-03-23 11:07:40Z sam $"; 26 #endif 27 28 /* libcaca based SDL video driver implementation. 29 */ 30 31 #include <stdlib.h> 32 #include <stdio.h> 33 #include <string.h> 34 #include <unistd.h> 35 #include <sys/stat.h> 36 37 38 #include "SDL.h" 39 #include "SDL_error.h" 40 #include "SDL_video.h" 41 #include "SDL_mouse.h" 42 #include "SDL_sysvideo.h" 43 #include "SDL_pixels_c.h" 44 #include "SDL_events_c.h" 45 46 #include "SDL_cacavideo.h" 47 #include "SDL_cacaevents_c.h" 48 49 #include <caca.h> 50 51 /* Initialization/Query functions */ 52 static int Caca_VideoInit(_THIS, SDL_PixelFormat *vformat); 53 static SDL_Rect **Caca_ListModes(_THIS, SDL_PixelFormat *format, Uint32 flags); 54 static SDL_Surface *Caca_SetVideoMode(_THIS, SDL_Surface *current, int width, int height, int bpp, Uint32 flags); 55 static void Caca_VideoQuit(_THIS); 56 57 /* Hardware surface functions */ 58 static int Caca_AllocHWSurface(_THIS, SDL_Surface *surface); 59 static int Caca_LockHWSurface(_THIS, SDL_Surface *surface); 60 static int Caca_FlipHWSurface(_THIS, SDL_Surface *surface); 61 static void Caca_UnlockHWSurface(_THIS, SDL_Surface *surface); 62 static void Caca_FreeHWSurface(_THIS, SDL_Surface *surface); 63 64 /* Cache the VideoDevice struct */ 65 static struct SDL_VideoDevice *local_this; 66 67 /* libcaca driver bootstrap functions */ 68 69 static int Caca_Available(void) 70 { 71 return 1; /* Always available ! */ 72 } 73 74 static void Caca_DeleteDevice(SDL_VideoDevice *device) 75 { 76 free(device->hidden); 77 free(device); 78 } 79 80 static SDL_VideoDevice *Caca_CreateDevice(int devindex) 81 { 82 SDL_VideoDevice *device; 83 84 /* Initialize all variables that we clean on shutdown */ 85 device = (SDL_VideoDevice *)malloc(sizeof(SDL_VideoDevice)); 86 if ( device ) { 87 memset(device, 0, (sizeof *device)); 88 device->hidden = (struct SDL_PrivateVideoData *) 89 malloc((sizeof *device->hidden)); 90 } 91 if ( (device == NULL) || (device->hidden == NULL) ) { 92 SDL_OutOfMemory(); 93 if ( device ) { 94 free(device); 95 } 96 return(0); 97 } 98 memset(device->hidden, 0, (sizeof *device->hidden)); 99 100 /* Set the function pointers */ 101 device->VideoInit = Caca_VideoInit; 102 device->ListModes = Caca_ListModes; 103 device->SetVideoMode = Caca_SetVideoMode; 104 device->CreateYUVOverlay = NULL; 105 device->SetColors = NULL; 106 device->UpdateRects = NULL; 107 device->VideoQuit = Caca_VideoQuit; 108 device->AllocHWSurface = Caca_AllocHWSurface; 109 device->CheckHWBlit = NULL; 110 device->FillHWRect = NULL; 111 device->SetHWColorKey = NULL; 112 device->SetHWAlpha = NULL; 113 device->LockHWSurface = Caca_LockHWSurface; 114 device->UnlockHWSurface = Caca_UnlockHWSurface; 115 device->FlipHWSurface = NULL; 116 device->FreeHWSurface = Caca_FreeHWSurface; 117 device->SetCaption = NULL; 118 device->SetIcon = NULL; 119 device->IconifyWindow = NULL; 120 device->GrabInput = NULL; 121 device->GetWMInfo = NULL; 122 device->InitOSKeymap = Caca_InitOSKeymap; 123 device->PumpEvents = Caca_PumpEvents; 124 125 device->free = Caca_DeleteDevice; 126 127 return device; 128 } 129 130 VideoBootStrap Caca_bootstrap = { 131 "caca", "Color ASCII Art Library", 132 Caca_Available, Caca_CreateDevice 133 }; 134 135 int Caca_VideoInit(_THIS, SDL_PixelFormat *vformat) 136 { 137 int i; 138 139 /* Initialize all variables that we clean on shutdown */ 140 for ( i=0; i<SDL_NUMMODES; ++i ) { 141 SDL_modelist[i] = malloc(sizeof(SDL_Rect)); 142 SDL_modelist[i]->x = SDL_modelist[i]->y = 0; 143 } 144 /* Modes sorted largest to smallest */ 145 SDL_modelist[0]->w = 1024; SDL_modelist[0]->h = 768; 146 SDL_modelist[1]->w = 800; SDL_modelist[1]->h = 600; 147 SDL_modelist[2]->w = 640; SDL_modelist[2]->h = 480; 148 SDL_modelist[3]->w = 320; SDL_modelist[3]->h = 400; 149 SDL_modelist[4]->w = 320; SDL_modelist[4]->h = 240; 150 SDL_modelist[5]->w = 320; SDL_modelist[5]->h = 200; 151 SDL_modelist[6] = NULL; 152 153 Caca_mutex = SDL_CreateMutex(); 154 155 /* Initialize the library */ 156 if ( caca_init() != 0 ) { 157 SDL_SetError("Unable to initialize libcaca"); 158 return(-1); 159 } 160 161 /* Initialize private variables */ 162 Caca_lastkey = 0; 163 Caca_bitmap = NULL; 164 Caca_buffer = NULL; 165 166 local_this = this; 167 168 /* Determine the screen depth (use default 8-bit depth) */ 169 vformat->BitsPerPixel = 8; 170 vformat->BytesPerPixel = 1; 171 172 /* We're done! */ 173 return(0); 174 } 175 176 SDL_Rect **Caca_ListModes(_THIS, SDL_PixelFormat *format, Uint32 flags) 177 { 178 if(format->BitsPerPixel != 8) 179 return NULL; 180 181 if ( flags & SDL_FULLSCREEN ) { 182 return SDL_modelist; 183 } else { 184 return (SDL_Rect **) -1; 185 } 186 } 187 188 /* Various screen update functions available */ 189 static void Caca_DirectUpdate(_THIS, int numrects, SDL_Rect *rects); 190 191 SDL_Surface *Caca_SetVideoMode(_THIS, SDL_Surface *current, 192 int width, int height, int bpp, Uint32 flags) 193 { 194 if ( Caca_buffer ) { 195 free( Caca_buffer ); 196 Caca_buffer = NULL; 197 } 198 199 if ( Caca_bitmap ) { 200 caca_free_bitmap( Caca_bitmap ); 201 Caca_bitmap = NULL; 202 } 203 204 Caca_buffer = malloc(2 * ((width + 15) & ~15) * height); 205 if ( ! Caca_buffer ) { 206 SDL_SetError("Couldn't allocate buffer for requested mode"); 207 return(NULL); 208 } 209 210 memset(Caca_buffer, 0, 2 * ((width + 15) & ~15) * height); 211 212 /* Allocate the new pixel format for the screen */ 213 if ( ! SDL_ReallocFormat(current, 16, 0xf800, 0x07e0, 0x001f, 0) ) { 214 return(NULL); 215 } 216 217 /* Set up the new mode framebuffer */ 218 current->flags = SDL_FULLSCREEN; 219 Caca_w = current->w = width; 220 Caca_h = current->h = height; 221 current->pitch = 2 * ((width + 15) & ~15); 222 current->pixels = Caca_buffer; 223 224 /* Create the libcaca bitmap */ 225 Caca_bitmap = caca_create_bitmap( 16, width, height, current->pitch, 0xf800, 0x07e0, 0x001f, 0x0000 ); 226 if ( ! Caca_bitmap ) { 227 SDL_SetError("Couldn't allocate libcaca bitmap"); 228 return(NULL); 229 } 230 231 /* Set the blit function */ 232 this->UpdateRects = Caca_DirectUpdate; 233 234 /* We're done */ 235 return(current); 236 } 237 238 /* We don't actually allow hardware surfaces other than the main one */ 239 static int Caca_AllocHWSurface(_THIS, SDL_Surface *surface) 240 { 241 return(-1); 242 } 243 static void Caca_FreeHWSurface(_THIS, SDL_Surface *surface) 244 { 245 return; 246 } 247 248 /* We need to wait for vertical retrace on page flipped displays */ 249 static int Caca_LockHWSurface(_THIS, SDL_Surface *surface) 250 { 251 /* TODO ? */ 252 return(0); 253 } 254 static void Caca_UnlockHWSurface(_THIS, SDL_Surface *surface) 255 { 256 return; 257 } 258 259 /* FIXME: How is this done with libcaca? */ 260 static int Caca_FlipHWSurface(_THIS, SDL_Surface *surface) 261 { 262 SDL_mutexP(Caca_mutex); 263 caca_refresh(); 264 SDL_mutexV(Caca_mutex); 265 return(0); 266 } 267 268 static void Caca_DirectUpdate(_THIS, int numrects, SDL_Rect *rects) 269 { 270 SDL_mutexP(Caca_mutex); 271 caca_draw_bitmap( 0, 0, caca_get_width() - 1, caca_get_height() - 1, 272 Caca_bitmap, Caca_buffer ); 273 caca_refresh(); 274 SDL_mutexV(Caca_mutex); 275 return; 276 } 277 278 /* Note: If we are terminated, this could be called in the middle of 279 another SDL video routine -- notably UpdateRects. 280 */ 281 void Caca_VideoQuit(_THIS) 282 { 283 int i; 284 285 /* Free video mode lists */ 286 for ( i=0; i<SDL_NUMMODES; ++i ) { 287 if ( SDL_modelist[i] != NULL ) { 288 free(SDL_modelist[i]); 289 SDL_modelist[i] = NULL; 290 } 291 } 292 293 if ( Caca_bitmap ) { 294 caca_free_bitmap( Caca_bitmap ); 295 Caca_bitmap = NULL; 296 } 297 298 caca_end(); 299 300 SDL_DestroyMutex(Caca_mutex); 301 } -
src/video/caca/SDL_cacavideo.h
diff -puriN -x Makefile -x '*.la' libsdl1.2-1.2.6/src/video/caca/SDL_cacavideo.h libsdl1.2-1.2.6-caca/src/video/caca/SDL_cacavideo.h
old new 1 /* 2 SDL - Simple DirectMedia Layer 3 Copyright (C) 2003 Sam Hocevar 4 5 This library is free software; you can redistribute it and/or 6 modify it under the terms of the GNU Library General Public 7 License as published by the Free Software Foundation; either 8 version 2 of the License, or (at your option) any later version. 9 10 This library is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 Library General Public License for more details. 14 15 You should have received a copy of the GNU Library General Public 16 License along with this library; if not, write to the Free 17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 19 Sam Hocevar 20 sam@zoy.org 21 */ 22 23 #ifdef SAVE_RCSID 24 static char rcsid = 25 "@(#) $Id: patch-libsdl1.2-libcaca0.7.diff 809 2005-03-23 11:07:40Z sam $"; 26 #endif 27 28 #ifndef _SDL_cacavideo_h 29 #define _SDL_cacavideo_h 30 31 #include "SDL_mouse.h" 32 #include "SDL_sysvideo.h" 33 #include "SDL_mutex.h" 34 35 #include <sys/time.h> 36 #include <time.h> 37 38 #include <caca.h> 39 40 /* Hidden "this" pointer for the video functions */ 41 #define _THIS SDL_VideoDevice *this 42 43 #define SDL_NUMMODES 6 44 45 /* Private display data */ 46 struct SDL_PrivateVideoData { 47 SDL_Rect *SDL_modelist[SDL_NUMMODES+1]; 48 SDL_mutex *mutex; 49 50 struct caca_bitmap *bitmap; 51 void *buffer; 52 int w, h; 53 54 int lastkey; 55 struct timeval lasttime; 56 }; 57 58 /* Old variable names */ 59 #define SDL_modelist (this->hidden->SDL_modelist) 60 #define Caca_palette (this->hidden->palette) 61 #define Caca_bitmap (this->hidden->bitmap) 62 #define Caca_buffer (this->hidden->buffer) 63 64 #define Caca_w (this->hidden->w) 65 #define Caca_h (this->hidden->h) 66 67 #define Caca_lastkey (this->hidden->lastkey) 68 #define Caca_lasttime (this->hidden->lasttime) 69 70 #define Caca_mutex (this->hidden->mutex) 71 72 #endif /* _SDL_cacavideo_h */
Note:
See TracBrowser
for help on using the repository browser.