src/video/SDL_video.c
branchSDL-1.3
changeset 1660 8b9d79e7eacf
parent 1658 e49147870aac
child 1662 782fd950bd46
     1.1 --- a/src/video/SDL_video.c	Wed May 17 08:18:28 2006 +0000
     1.2 +++ b/src/video/SDL_video.c	Sat May 20 04:35:58 2006 +0000
     1.3 @@ -137,6 +137,18 @@
     1.4  
     1.5  static SDL_GrabMode SDL_WM_GrabInputOff(void);
     1.6  
     1.7 +int SDL_GetNumVideoDrivers(void)
     1.8 +{
     1.9 +	return(SDL_arraysize(bootstrap)-1);
    1.10 +}
    1.11 +
    1.12 +const char *SDL_GetVideoDriver(int index)
    1.13 +{
    1.14 +	if ( index >= 0 && index < SDL_GetNumVideoDrivers() ) {
    1.15 +		return(bootstrap[index]->name);
    1.16 +	}
    1.17 +	return(NULL);
    1.18 +}
    1.19  
    1.20  /*
    1.21   * Initialize the video and event subsystems -- determine native pixel format
    1.22 @@ -278,11 +290,10 @@
    1.23  	return(0);
    1.24  }
    1.25  
    1.26 -char *SDL_VideoDriverName(char *namebuf, int maxlen)
    1.27 +const char *SDL_GetCurrentVideoDriver()
    1.28  {
    1.29 -	if ( current_video != NULL ) {
    1.30 -		SDL_strlcpy(namebuf, current_video->name, maxlen);
    1.31 -		return(namebuf);
    1.32 +	if ( current_video ) {
    1.33 +		return current_video->name;
    1.34  	}
    1.35  	return(NULL);
    1.36  }