Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a multi-monitor setup with two displays, both 1920x1200. In games, I can only select resolutions > 1920x1200 (like 2560x1200) which makes games unusable.

Full screen doesn't work either because it switches one display to 800x600 which means I can't reach the close button... I have to kill the game and then, I have to restore my desktop because all windows are moved/resized.

How can I force SDL to use any resolution that I want?

share|improve this question
up vote 1 down vote accepted

If this is a game you're making with SDL, then use SDL_SetVideoMode to set any resolution you want. Just pass in values for width and height.

If this is a game you're trying to play that uses SDL, then you'll have to provide more details, such as what the game is (also, Gaming.SE would be better suited for such a question)

[EDIT] If the game uses SDL to get a list of video modes, it calls SDL_ListModes. There is currently no way to influence the result of this method with, say, environment variables.

share|improve this answer
I was hoping that there is a hidden env variable or something that allows me to force any resolution, no matter what SDL thinks as valid. On a similar train of thought, how does SDL know the available resolutions? Maybe I can add something to this list. – Aaron Digulla Dec 1 '11 at 13:42
@AaronDigulla Is this for a game you're making, or a game you're trying to play? – thedaian Dec 1 '11 at 14:48
It's a game that I want to play. I want to know if the game uses a SDL function to figure out the available resolutions and how I can influence this process. If that isn't possible, then I'll have to report a bug :-/ – Aaron Digulla Dec 1 '11 at 19:51
Without knowing what the game is, it's impossible to know if the game uses an SDL function to figure out available resolutions. If it does, it probably uses SDL_ListModes, and as far as I know, it's impossible to influence that. – thedaian Dec 1 '11 at 20:09
@AaronDigulla It seems that, for Windows, SDL_ListModes gets its info from EnumDisplaySettings. I don't believe there's any way to influence the value, since it uses the ENUM_CURRENT_SETTINGS mode. If you want to know how it works for operating systems other than Windows, then I suggest you search through the source code. – thedaian Dec 3 '11 at 2:16

In the mean time, I've written a patch for SDL 1.2 which allows to force a screen size down its throat:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.