Sign in to follow this  

why the resolution of my SDL program is smaller ?

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

[size="5"]hi,
i notice that when i open a window in SDL, the resolution is smaller than my monitor's. my monitor's resolution is 1920x1080, but when i open a SDL window with screen width and heigth of 900x500, it cover almost all my screen. can i open a window with the resolution that my monitor is capable? please show me how or explain why not.
thanks

[/size]

Share this post


Link to post
Share on other sites
You set the size of the SDL window when you call SDL_SetVideoMode. You can use SDL_GetVideoInfo() to get the monitor resolution.
[code]const SDL_VideoInfo* videoInfo = SDL_GetVideoInfo();
SDL_SetVideoMode(videoInfo->current_w, videoInfo->current_h, 0, SDL_SWSURFACE|SDL_FULLSCREEN|SDL_NOFRAME);[/code]

Share this post


Link to post
Share on other sites

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

If you intended to correct an error in the post then please contact us.

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