SDL_GetCurrentVideoDriver

Name

SDL_GetCurrentVideoDriver -- Gets the name of the initialized video driver.

Synopsis

#include "SDL_video.h"

const char* SDL_GetCurrentVideoDriver (void);

Description

SDL_GetCurrentVideoDriver gets the name of the currently initialized video driver.

Return Value

The name of the current video driver or NULL if no driver has been initialized.

Example

   1 #include "SDL.h"
   2 #include <stdio.h>
   3 
   4 int main(int argc, char** argv) {
   5   if (SDL_Init(SDL_INIT_VIDEO) != 0) {
   6     printf("Error initializing SDL:  %s\n", SDL_GetError());
   7     return 1;
   8   }
   9   atexit(SDL_Quit);
  10 
  11   printf("Current SDL video driver is %s.\n", SDL_GetCurrentVideoDriver());
  12   return 0;
  13 }

See Also

SDL_GetNumVideoDrivers, SDL_GetVideoDriver


CategorySDL13API CategorySDL13APIVideo

SDL-1.3/SDL_GetCurrentVideoDriver (last edited 2009-07-27 06:43:30 by KenBull)