Jump to content
  • Advertisement
Sign in to follow this  
nickme

why the resolution of my SDL program is smaller ?

This topic is 2531 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

Share this post


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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!