I’m a newer hand to SDL, has some little question about SDL_GetVideoInfo.
this is my code:
#include “stdio.h”
#include “.\sdlinc\SDL.h”
int main(int arc, char** argv)
{
printf("\n\t\t\t GetVideoInfo\n");
if( (SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO)==-1)) {
printf(“Could not initialize SDL: %s.\n”, SDL_GetError());
return -1;
}
printf("\n\tSDL initialized.\n");
const SDL_VideoInfo *pVideoInfo = SDL_GetVideoInfo();
if (!pVideoInfo) {
printf("\n\t SDL_GetVideoInfo return NULL\n");
}else {
printf("\thardware surfaces : %d\n", pVideoInfo->hw_available);
printf("\twindow manager available : %d\n", pVideoInfo->wm_available);
printf("\thardware to hardware blits : %d\n", pVideoInfo->blit_hw);
printf("\thardware to hardware colorkey blits : %d\n", pVideoInfo->blit_hw_CC);
printf("\thardware to hardware alpha blits : %d\n", pVideoInfo->blit_hw_A);
printf("\tsoftware to hardware blits : %d\n", pVideoInfo->blit_sw);
printf("\tsoftware to hardware colorkey blits : %d\n", pVideoInfo->blit_sw_CC);
printf("\tsoftware to hardware alpha blits : %d\n", pVideoInfo->blit_sw_A);
printf("\tcolor fills accelerated : %d\n", pVideoInfo->blit_fill);
printf("\tTotal video memory Kilobytes : %d\n", pVideoInfo->video_mem);
}
SDL_Quit();
printf("\tSDL quiting.\n");
return 0;
}
my Videocard is Geforce4 MX440 with 64M dispmemory, run the code in Win2000, pVideoInfo->video_mem is 60224, about 58.8M, how to explain this?
and run in Linux redhat 2.4.20, only pVideoInfo->wm_available = 1, others flag bits are all zero, and video_mem not right too, should i update my linux display driver?
thank you all.