• 14
• 12
• 9
• 10
• 13

# SDL - Adjust fullscreen resolution

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

## Recommended Posts

I want to provide the ability for users to scale the resolution down so my game can run faster on older systems.

I am currently using the desktop resolution and feeding that into the SDL function :

 const SDL_VideoInfo* ptrVidInfo = SDL_GetVideoInfo(); desktopWidth = ptrVidInfo->current_w; desktopHeight = ptrVidInfo->current_h; sdlScreen = SDL_SetVideoMode( desktopWidth , desktopHeight , 0, SDL_OPENGL | SDL_FULLSCREEN);

My idea was to allow the user to scale the resolution down by some percentage. So just as a test I tried manually setting the resolution to 1280x720 on my 1920x1080p monitor. Instead of stretching to cover the screen as I expected, I got a squished image with a black bar across the top.

I've tried many resolutions using all kinds of aspect ratios. None of them fill the screen and most of them (even with same aspect ratio as monitor) have some amount of stretching.

How do people change the resolution of their fullscreen SDL applications?