[SDL] I get no value for videoInfo->vfmt->BytesPerPixel

Gunnar G debian at comhem.se
Tue Oct 3 02:43:31 PDT 2006


In my code I try to do

        const SDL_VideoInfo* videoInfo;
        videoInfo = SDL_GetVideoInfo();
        std::cout<<"pixlar "<<videoInfo->vfmt->BytesPerPixel<<std::endl;
        std::cout<<videoInfo->current_w;

and I get priting of

pixlar
1600

while running 1600x1200 resolution.
But I get no value for BytesPerPixel.
I run this code before calling SDL_SetVideoMode.
Shouldn't I then get a value or have I missed something important here?





More information about the SDL mailing list