src/video/SDL_video.c
changeset 1361 19418e4422cb
parent 1358 c71e05b4dc2e
child 1379 c0a74f199ecf
     1.1 --- a/src/video/SDL_video.c	Fri Feb 10 07:29:08 2006 +0000
     1.2 +++ b/src/video/SDL_video.c	Thu Feb 16 10:11:48 2006 +0000
     1.3 @@ -24,102 +24,102 @@
     1.4  
     1.5  #include "SDL.h"
     1.6  #include "SDL_sysvideo.h"
     1.7 -#include "SDL_sysevents.h"
     1.8  #include "SDL_blit.h"
     1.9  #include "SDL_pixels_c.h"
    1.10 -#include "SDL_events_c.h"
    1.11  #include "SDL_cursor_c.h"
    1.12 +#include "../events/SDL_sysevents.h"
    1.13 +#include "../events/SDL_events_c.h"
    1.14  
    1.15  /* Available video drivers */
    1.16  static VideoBootStrap *bootstrap[] = {
    1.17 -#ifdef ENABLE_QUARTZ
    1.18 +#if SDL_VIDEO_DRIVER_QUARTZ
    1.19  	&QZ_bootstrap,
    1.20  #endif
    1.21 -#ifdef ENABLE_X11
    1.22 +#if SDL_VIDEO_DRIVER_X11
    1.23  	&X11_bootstrap,
    1.24  #endif
    1.25 -#ifdef ENABLE_DGA
    1.26 +#if SDL_VIDEO_DRIVER_DGA
    1.27  	&DGA_bootstrap,
    1.28  #endif
    1.29 -#ifdef ENABLE_NANOX
    1.30 +#if SDL_VIDEO_DRIVER_NANOX
    1.31  	&NX_bootstrap,
    1.32  #endif
    1.33 -#ifdef ENABLE_IPOD
    1.34 +#if SDL_VIDEO_DRIVER_IPOD
    1.35  	&iPod_bootstrap,
    1.36  #endif
    1.37 -#ifdef ENABLE_QTOPIA
    1.38 +#if SDL_VIDEO_DRIVER_QTOPIA
    1.39  	&Qtopia_bootstrap,
    1.40  #endif
    1.41 -#ifdef ENABLE_WSCONS
    1.42 +#if SDL_VIDEO_DRIVER_WSCONS
    1.43  	&WSCONS_bootstrap,
    1.44  #endif
    1.45 -#ifdef ENABLE_FBCON
    1.46 +#if SDL_VIDEO_DRIVER_FBCON
    1.47  	&FBCON_bootstrap,
    1.48  #endif
    1.49 -#ifdef ENABLE_DIRECTFB
    1.50 +#if SDL_VIDEO_DRIVER_DIRECTFB
    1.51  	&DirectFB_bootstrap,
    1.52  #endif
    1.53 -#ifdef ENABLE_PS2GS
    1.54 +#if SDL_VIDEO_DRIVER_PS2GS
    1.55  	&PS2GS_bootstrap,
    1.56  #endif
    1.57 -#ifdef ENABLE_GGI
    1.58 +#if SDL_VIDEO_DRIVER_GGI
    1.59  	&GGI_bootstrap,
    1.60  #endif
    1.61 -#ifdef ENABLE_VGL
    1.62 +#if SDL_VIDEO_DRIVER_VGL
    1.63  	&VGL_bootstrap,
    1.64  #endif
    1.65 -#ifdef ENABLE_SVGALIB
    1.66 +#if SDL_VIDEO_DRIVER_SVGALIB
    1.67  	&SVGALIB_bootstrap,
    1.68  #endif
    1.69 -#ifdef ENABLE_AALIB
    1.70 +#if SDL_VIDEO_DRIVER_GAPI
    1.71 +	&GAPI_bootstrap,
    1.72 +#endif
    1.73 +#if SDL_VIDEO_DRIVER_WINDIB
    1.74 +	&WINDIB_bootstrap,
    1.75 +#endif
    1.76 +#if SDL_VIDEO_DRIVER_DDRAW
    1.77 +	&DIRECTX_bootstrap,
    1.78 +#endif
    1.79 +#if SDL_VIDEO_DRIVER_BWINDOW
    1.80 +	&BWINDOW_bootstrap,
    1.81 +#endif
    1.82 +#if SDL_VIDEO_DRIVER_TOOLBOX
    1.83 +	&TOOLBOX_bootstrap,
    1.84 +#endif
    1.85 +#if SDL_VIDEO_DRIVER_DRAWSPROCKET
    1.86 +	&DSp_bootstrap,
    1.87 +#endif
    1.88 +#if SDL_VIDEO_DRIVER_CYBERGRAPHICS
    1.89 +	&CGX_bootstrap,
    1.90 +#endif
    1.91 +#if SDL_VIDEO_DRIVER_PHOTON
    1.92 +	&ph_bootstrap,
    1.93 +#endif
    1.94 +#if SDL_VIDEO_DRIVER_EPOC
    1.95 +	&EPOC_bootstrap,
    1.96 +#endif
    1.97 +#if SDL_VIDEO_DRIVER_XBIOS
    1.98 +	&XBIOS_bootstrap,
    1.99 +#endif
   1.100 +#if SDL_VIDEO_DRIVER_GEM
   1.101 +	&GEM_bootstrap,
   1.102 +#endif
   1.103 +#if SDL_VIDEO_DRIVER_PICOGUI
   1.104 +	&PG_bootstrap,
   1.105 +#endif
   1.106 +#if SDL_VIDEO_DRIVER_DC
   1.107 +	&DC_bootstrap,
   1.108 +#endif
   1.109 +#if SDL_VIDEO_DRIVER_RISCOS
   1.110 +	&RISCOS_bootstrap,
   1.111 +#endif
   1.112 +#if SDL_VIDEO_DRIVER_OS2FS
   1.113 +	&OS2FSLib_bootstrap,
   1.114 +#endif
   1.115 +#if SDL_VIDEO_DRIVER_AALIB
   1.116  	&AALIB_bootstrap,
   1.117  #endif
   1.118 -#ifdef ENABLE_GAPI
   1.119 -	&GAPI_bootstrap,
   1.120 -#endif
   1.121 -#ifdef ENABLE_WINDIB
   1.122 -	&WINDIB_bootstrap,
   1.123 -#endif
   1.124 -#ifdef ENABLE_DIRECTX
   1.125 -	&DIRECTX_bootstrap,
   1.126 -#endif
   1.127 -#ifdef ENABLE_BWINDOW
   1.128 -	&BWINDOW_bootstrap,
   1.129 -#endif
   1.130 -#ifdef ENABLE_TOOLBOX
   1.131 -	&TOOLBOX_bootstrap,
   1.132 -#endif
   1.133 -#ifdef ENABLE_DRAWSPROCKET
   1.134 -	&DSp_bootstrap,
   1.135 -#endif
   1.136 -#ifdef ENABLE_CYBERGRAPHICS
   1.137 -	&CGX_bootstrap,
   1.138 -#endif
   1.139 -#ifdef ENABLE_PHOTON
   1.140 -	&ph_bootstrap,
   1.141 -#endif
   1.142 -#ifdef ENABLE_EPOC
   1.143 -	&EPOC_bootstrap,
   1.144 -#endif
   1.145 -#ifdef ENABLE_XBIOS
   1.146 -	&XBIOS_bootstrap,
   1.147 -#endif
   1.148 -#ifdef ENABLE_GEM
   1.149 -	&GEM_bootstrap,
   1.150 -#endif
   1.151 -#ifdef ENABLE_PICOGUI
   1.152 -	&PG_bootstrap,
   1.153 -#endif
   1.154 -#ifdef ENABLE_DC
   1.155 -	&DC_bootstrap,
   1.156 -#endif
   1.157 -#ifdef ENABLE_RISCOS
   1.158 -	&RISCOS_bootstrap,
   1.159 -#endif
   1.160 -#ifdef __OS2__
   1.161 -	&OS2FSLib_bootstrap,
   1.162 -#endif
   1.163 -#ifdef ENABLE_DUMMYVIDEO
   1.164 +#if SDL_VIDEO_DRIVER_DUMMY
   1.165  	&DUMMY_bootstrap,
   1.166  #endif
   1.167  	NULL
   1.168 @@ -133,7 +133,7 @@
   1.169  void SDL_GL_UpdateRectsLock(SDL_VideoDevice* this, int numrects, SDL_Rect* rects);
   1.170  
   1.171  static SDL_GrabMode SDL_WM_GrabInputOff(void);
   1.172 -#ifdef HAVE_OPENGL
   1.173 +#if SDL_VIDEO_OPENGL
   1.174  static int lock_count = 0;
   1.175  #endif
   1.176  
   1.177 @@ -743,7 +743,7 @@
   1.178  	SDL_WM_GrabInput(saved_grab);
   1.179  	SDL_GetRelativeMouseState(NULL, NULL); /* Clear first large delta */
   1.180  
   1.181 -#ifdef HAVE_OPENGL
   1.182 +#if SDL_VIDEO_OPENGL
   1.183  	/* Load GL symbols (before MakeCurrent, where we need glGetString). */
   1.184  	if ( flags & (SDL_OPENGL | SDL_OPENGLBLIT) ) {
   1.185  
   1.186 @@ -769,7 +769,7 @@
   1.187  #include "SDL_glfuncs.h"
   1.188  #undef SDL_PROC	
   1.189  	}
   1.190 -#endif /* HAVE_OPENGL */
   1.191 +#endif /* SDL_VIDEO_OPENGL */
   1.192  
   1.193  	/* If we're running OpenGL, make the context current */
   1.194  	if ( (video->screen->flags & SDL_OPENGL) &&
   1.195 @@ -782,7 +782,7 @@
   1.196  	/* Set up a fake SDL surface for OpenGL "blitting" */
   1.197  	if ( (flags & SDL_OPENGLBLIT) == SDL_OPENGLBLIT ) {
   1.198  		/* Load GL functions for performing the texture updates */
   1.199 -#ifdef HAVE_OPENGL
   1.200 +#if SDL_VIDEO_OPENGL
   1.201  
   1.202  		/* Create a software surface for blitting */
   1.203  #ifdef GL_VERSION_1_2
   1.204 @@ -857,7 +857,7 @@
   1.205  
   1.206  		video->UpdateRects = SDL_GL_UpdateRectsLock;
   1.207  #else
   1.208 -		SDL_SetError("Somebody forgot to #define HAVE_OPENGL");
   1.209 +		SDL_SetError("Somebody forgot to #define SDL_VIDEO_OPENGL");
   1.210  		return(NULL);
   1.211  #endif
   1.212  	}
   1.213 @@ -1513,7 +1513,7 @@
   1.214  /* Update rects without state setting and changing (the caller is responsible for it) */
   1.215  void SDL_GL_UpdateRects(int numrects, SDL_Rect *rects)
   1.216  {
   1.217 -#ifdef HAVE_OPENGL
   1.218 +#if SDL_VIDEO_OPENGL
   1.219  	SDL_VideoDevice *this = current_video;
   1.220  	SDL_Rect update, tmp;
   1.221  	int x, y, i;
   1.222 @@ -1587,7 +1587,7 @@
   1.223  /* Lock == save current state */
   1.224  void SDL_GL_Lock()
   1.225  {
   1.226 -#ifdef HAVE_OPENGL
   1.227 +#if SDL_VIDEO_OPENGL
   1.228  	lock_count--;
   1.229  	if (lock_count==-1)
   1.230  	{
   1.231 @@ -1635,7 +1635,7 @@
   1.232  /* Unlock == restore saved state */
   1.233  void SDL_GL_Unlock()
   1.234  {
   1.235 -#ifdef HAVE_OPENGL
   1.236 +#if SDL_VIDEO_OPENGL
   1.237  	lock_count++;
   1.238  	if (lock_count==0)
   1.239  	{