[SDL] a problem on SDL_GetVideoInfo()

John M. john.magnotti at gmail.com
Wed Sep 19 10:31:40 PDT 2007


Hey,

I would check out this post and see if it answers your question:
http://www.libsdl.org/faq.php?action=listentries&category=2#20


John

On 9/18/07, dh11111 <dh11111 at 126.com> wrote:
> 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?
>
> ________________________________
>  全 国 万 名 职 场 女 性,齐 聚 非 常 美 女,惊 艳 2 0 0 7
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
>


More information about the SDL mailing list