Sign in to follow this  
kuroi

sdl fullscreen problem

Recommended Posts

i'm having some trouble with working at fullscreen. this is the code:
#define SCREEN_WIDTH  640
#define SCREEN_HEIGHT 480
#define SCREEN_BPP     32

bool fullscreen = false;

void MudaVideo(int t)
{
    fullscreen = (t == SDL_FULLSCREEN);
    screen = SDL_SetVideoMode(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP, t);
}
to change the video i just call it this way:
    MudaVideo(SDL_FULLSCREEN);
or
    MudaVideo(SDL_SWSURFACE);                    
this seems to work fine on the computer i'm working. the problem is, when i take the project to another computer, the fullscreen doesn't work. i mean, it really turns into full screen, but the screen is not streched. when working on the window mode, my game occupies a region of 480 X 640 pixels. when i turn to fullscreen on the computer i'm working, the region is streched, the images are zoomed, and occupy the full monitor. but i tried to take it to two other different pcs, and it happens that when i turn to fullscreen, the image does not strech, it remains occupying a region of 480 X 640 pixels, and is surrounded by black. what could it be?? is this common?? this is sdl for windows compiled on dev c++. thanks.

Share this post


Link to post
Share on other sites
In my experience this happens when you aren't using a native resolution that the monitor supports. It then will display the screen in the resolution specified with the black border around the screen since it cannot scale the resolution properly.

This usually happens with LCD monitors since CRTs are able to scale easier.

So my advice would be to check if the resolution you have specified is supported by the monitor you are using.

Share this post


Link to post
Share on other sites
Signal is correct, the monitor must not support such a low resolution. You could try 800x600 which is much more likely to be a supported resolution.

Share this post


Link to post
Share on other sites
thanks, signal, simian man.
right now, i don't have access to other computer besides mine, so i can't test anything. but soon, i shall try it again on 800x600 at the other two computers i mentioned (one of them is crt, the other lcd) and if i have som problem, i'll post here again.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this