Possible bug in SDL_WINDOWPOS_CENTERED_DISPLAY(x)

"^DJ_Link^" <[email protected]>
Newsgroups gmane.comp.lib.sdl
Message-ID <[email protected]>
Hi.

So I was doing some experiments with my code, mainly allowing the user to select in which monitor he wants to place the game window.
But I encounter an issue.

My setup:
Windows
I have a hi-dpi laptop (macbook retina) connected to a regular monitor via HDMI.

Case A:
Laptop monitor is 0 (primary)
External Monitor is 1

I can set SDL_WINDOWPOS_CENTERED_DISPLAY with 0 or 1 and the window will be placed at the appropriate monitor, in either full screen or window mode. Works ok.

Case B:

If on OS Display Settings I switch the External monitor to primary it doesn't work anymore

External Monitor is 0 (primary)
Laptop monitor is 1

When I set SDL_WINDOWPOS_CENTERED_DISPLAY (0) the window gets placed correctly in either fullscreen or window mode. However, once I put

SDL_WINDOWPOS_CENTERED_DISPLAY (1) to set it to second screen it doesn't work. In fullscreen it uses monitor 0, in window mode it gets placed at the center of the 2 screens (half of the window on each monitor).

Using SDL_WINDOW_ALLOW_HIGHDPI doesn't seem to make any difference.


I think the problem has to do with having the external monitor (non-retina) as primary and trying to set it on a secondary one (hi-dpi)
but I don't have a regular screen laptop to see if it makes difference, but I'm assuming that's the culprit. 

Can anyone test this and see if I'm crazy or not?

------------------------
@DJ_Link

www.david-amador.com

_______________________________________________
SDL mailing list
[email protected]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.