The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Fullscreen window position / display selection
TUUG86


Joined: 17 Jul 2014
Posts: 1
I am using SDL_WINDOW_FULLSCREEN_DESKTOP to fullscreen my application and maintain the desktop resolution. The problem is, the window is stuck at the left-lower corner of the screen, no matter what position/enum I set in SDL_CreateWindow. I guess SDL has literally given my program the full screen to draw over, so everything I draw at (0,0) get drawn at the display (0,0) coords. I'm using OpenGL calls directly, so this is quite bad.

Second, I found no direct method to set the display in the API, although it is straightforward to get information about each display and their modes. Unless I missed something, the only working method I found is to place the window at the absolute coordinates of the other displays, but this is unfeasible in a general situation and even worse in fullscreen.
Fullscreen window position / display selection
Alex Szpakowski
Guest

Have you tried using SDL_WINDOWPOS_CENTERED_DISPLAY(displayindex) for the x and y arguments to SDL_CreateWindow?

On Jul 18, 2014, at 12:50 PM, TUUG86 wrote:
Quote:
I am using SDL_WINDOW_FULLSCREEN_DESKTOP to fullscreen my application and maintain the desktop resolution. The problem is, the window is stuck at the left-lower corner of the screen, no matter what position/enum I set in SDL_CreateWindow. I guess SDL has literally given my program the full screen to draw over, so everything I draw at (0,0) get drawn at the display (0,0) coords. I'm using OpenGL calls directly, so this is quite bad.

Second, I found no direct method to set the display in the API, although it is straightforward to get information about each display and their modes. Unless I missed something, the only working method I found is to place the window at the absolute coordinates of the other displays, but this is unfeasible in a general situation and even worse in fullscreen.
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org