[SDL] a problem on SDL_GetVideoInfo()

dh11111 dh11111 at 126.com
Tue Sep 18 00:45:44 PDT 2007


Hi all.I try to get the amount of video card RAM with SDL,and my codes below get a result which doesn't seem to be right.  int main(int argc, char *argv[])
{const SDL_VideoInfo *info=NULL;   if( SDL_Init(SDL_INIT_AUDIO|SDL_INIT_VIDEO ) < 0 )
  {
    printf("Unable to init SDL: %s\n", SDL_GetError());
    exit(1);
  }
info=SDL_GetVideoInfo();
if(!info)
{
 printf(" %s",SDL_GetError());
 printf("unable to get video information\n");
 //return 0;
}printf("my video ram is %d\n",info->video_mem);//Here it prints that "my video ram is 0" but I know that my video card  equits with 64MB VRAM,what causes the info pointer doesn't show right value?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20070918/45934bbd/attachment.html 


More information about the SDL mailing list