diff include/SDL_video.h @ 1660:8b9d79e7eacf SDL-1.3

Added API requested in bug #43: Added SDL_GetNumVideoDrivers() and SDL_GetVideoDriver(). Replaced SDL_VideoDriverName() with SDL_GetCurrentVideoDriver() Added SDL_GetNumAudioDrivers() and SDL_GetAudioDriver(). Replaced SDL_AudioDriverName() with SDL_GetCurrentAudioDriver()
author Sam Lantinga <slouken@libsdl.org>
date Sat, 20 May 2006 04:35:58 +0000
parents e49147870aac
children 782fd950bd46
line wrap: on
line diff
--- a/include/SDL_video.h	Wed May 17 08:18:28 2006 +0000
+++ b/include/SDL_video.h	Sat May 20 04:35:58 2006 +0000
@@ -224,6 +224,12 @@
 
 /* Function prototypes */
 
+/* These functions return the list of built in video drivers, in the 
+ * order that they are normally initialized by default.
+ */
+extern DECLSPEC int SDLCALL SDL_GetNumVideoDrivers(void);
+extern DECLSPEC const char * SDLCALL SDL_GetVideoDriver(int index);
+
 /* These functions are used internally, and should not be used unless you
  * have a specific need to specify the video driver you want to use.
  * You should normally use SDL_Init() or SDL_InitSubSystem().
@@ -240,11 +246,10 @@
 extern DECLSPEC int SDLCALL SDL_VideoInit(const char *driver_name, Uint32 flags);
 extern DECLSPEC void SDLCALL SDL_VideoQuit(void);
 
-/* This function fills the given character buffer with the name of the
- * video driver, and returns a pointer to it if the video driver has
- * been initialized.  It returns NULL if no driver has been initialized.
+/* This function returns the name of the current video driver, or NULL
+ * if no driver has been initialized.
  */
-extern DECLSPEC char * SDLCALL SDL_VideoDriverName(char *namebuf, int maxlen);
+extern DECLSPEC const char * SDLCALL SDL_GetCurrentVideoDriver(void);
 
 /*
  * This function returns a pointer to the current display surface.