SDL not spreading across multiple monitors
My game uses SDL to create a fullscreen OpenGL window.
However, for those users with multiple monitors I get very mixed results.
Often the game appears spre开发者_如何学编程ad across both screens, which is decidedly wrong especially if the monitors are different sizes.
However, SDL_ListModes()
is not making it obvious to me what the real resolution choices are for full-screening an app in a multiple monitor scenario. Always the virtual screens are listed, and are indistinguishable from the physical screens.
How can you use SDL to list the available physical displays, and how do you create full-screen windows on them?
If you can't get SDL 1.2 to do the right thing automatically you could let the user specify the window position in a config file or via the command line.
Then you should be able to set the window position via SDL_VIDEO_WINDOW_POS before you init SDL.
精彩评论