You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This bug report was migrated from our old Bugzilla tracker.
Reported in version: HG 2.0 Reported for operating system, platform: Windows (All), All
Comments on the original bug report:
On 2011-01-25 11:02:26 +0000, Sam Lantinga wrote:
Alexander Hofmann
On Win32, what's the correct sequence of commands for creating 2 or more
fullscreen Windows?
So far, here's what I got:
SDL_Init (of course...)
SDL_GetNumVideoDisplays()
Select the appropriate display and Create a Window with specified size
and SDL_WINDOW_FULLSCREEN flag
Do some tasks and call SDL_ShowWindow
It work's great if all Windows are created with the same size as the
resolution of the desktop of every screen was at the time of
initializing SDL, but when I try to specify some other size (800x600
Pixels e.g. on former 1280x1024 and 1024x768 displays), the first Window
get's positioned correctly, but the second one is initialized at 480
pixels right of the top left corner of the 2. screen (1280-800). A
second problem is, that somehow the Event-Queue gets filled with events
if that happens, and the SDL_PollEvent command never returns from the
first call...
I took a look a the code and as far as I could understand it, the
position of a newly created Window is calculated using the coordinates
of the desktop-position of every display, which is being read on
initialization of SDL - is that correct?
At the moment, my workaround is to set all displays to the desired
resolution prior to SDL initialization using standard Windows-API, is
there any more elegant solution using SDL, or did I miss something?
On 2011-02-16 03:22:49 +0000, Sam Lantinga wrote:
I just did a bunch of work on multi-monitor and fullscreen support on Windows.
The way you set things up changed a little bit. Create each of your windows with the desired size and the fullscreen flag, and use this macro for the position: SDL_WINDOWPOS_CENTERED_DISPLAY(N), where N is the index of the display you want to create the window on.
e.g.
window = SDL_CreateWindow("Window on Monitor 1",
SDL_WINDOWPOS_CENTERED_DISPLAY(1),
SDL_WINDOWPOS_CENTERED_DISPLAY(1),
640, 480, SDL_WINDOW_FULLSCREEN|SDL_WINDOW_SHOWN);
This bug report was migrated from our old Bugzilla tracker.
Reported in version: HG 2.0
Reported for operating system, platform: Windows (All), All
Comments on the original bug report:
On 2011-01-25 11:02:26 +0000, Sam Lantinga wrote:
On 2011-02-16 03:22:49 +0000, Sam Lantinga wrote:
The text was updated successfully, but these errors were encountered: