sdl fullscreen problem

This topic is 3209 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

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 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 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 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 on other sites
I tried to see if there was a way to see what video modes your program would have access to. That is, list all supported resolutions. I believe it can. Read this.

Share on other sites
very good, nobobynews, thanks for that.

1. 1
2. 2
3. 3
Rutin
25
4. 4
5. 5
khawk
14

• 11
• 11
• 23
• 10
• 9
• Forum Statistics

• Total Topics
633648
• Total Posts
3013114
×