Opened 11 years ago
Closed 9 years ago
#1916 closed defect (wontfix)
[PATCH] Fullscreen doesn't work on multi-monitor setups with SDL1.2
Reported by: | yunta | Owned by: | |
---|---|---|---|
Priority: | Nice to Have | Milestone: | |
Component: | Core engine | Keywords: | patch |
Cc: | Patch: |
Description
I have 2 monitors. When started, 0ad detects screen size as the total size of all monitors, and proceeds to fail setting fullscreen mode with that size. Attached patch modifies screen size detection to use xrandr and return size of primary output. Not tested with sdl 2.0. Works in my setup (sdl 1.2), with one and both-monitors enabled. Due to sdl1.2 weirdness (doesn't seem to honour SDL_VIDEO_WINDOW_POS with fullscreen windows), primary display has to be left-top-most (at 0,0 coords).
Attachments (1)
Change History (18)
by , 11 years ago
Attachment: | xrandr.patch added |
---|
comment:1 by , 11 years ago
Summary: | Fullscreen doesn't work on multi-monitor setups with SDL1.2 → [PATCH] Fullscreen doesn't work on multi-monitor setups with SDL1.2 |
---|
comment:2 by , 11 years ago
Keywords: | review added |
---|
comment:3 by , 11 years ago
Keywords: | multimon added |
---|
comment:4 by , 11 years ago
Keywords: | patch added; multimon removed |
---|---|
Milestone: | Backlog → Alpha 14 |
Priority: | Should Have → Nice to Have |
follow-up: 7 comment:6 by , 11 years ago
I don't have a multi-monitor setup to test this, but it seems like it may be better to let SDL 2.0 provide a better solution, and avoid adding another dependency (xrandr). If the patch can be updated to work more correctly with SDL 1.2 that would be OK.
Apparently in SDL 2.0 there are (undocumented) macros SDL_WINDOWPOS_UNDEFINED_DISPLAY(X)
and SDL_WINDOWPOS_CENTERED_DISPLAY(X)
which can be passed to SDL_CreateWindow. So we could make the preferred display a config option :)
Do the other screens go blank with SDL 2.0?
comment:7 by , 11 years ago
Replying to historic_bruno:
Do the other screens go blank with SDL 2.0?
No. It just displays the desktop as before for me (on the secondary screen). Although the mouse is not able to leave the 0ad screen.
comment:8 by , 11 years ago
Milestone: | Alpha 14 → Alpha 15 |
---|
comment:9 by , 11 years ago
Keywords: | reviewed added; review removed |
---|
Markus has reviewed it, and there clearly are some problems with it. Taking it out of the review queue for now. If someone has improvements, the patch can be resubmitted for review.
comment:10 by , 10 years ago
Keywords: | reviewed removed |
---|
comment:11 by , 10 years ago
Milestone: | Alpha 15 → Alpha 16 |
---|
comment:13 by , 10 years ago
Milestone: | Backlog → Alpha 17 |
---|
Pushing it back to A17 since it seems we are moving to SDL2
comment:14 by , 10 years ago
Milestone: | Alpha 17 → Alpha 18 |
---|
SDL 1.2 will still be the default for A17 on Linux, so this problem won't be resolved by then. I can test multiple displays on Windows using my laptop, but someone else should test with latest SDL2 and Linux.
comment:15 by , 10 years ago
Works a lot better on Windows now. Extending my laptop's display onto a second monitor, I was able to play the game fullscreen on either display, while the other remained available. Using the display
config setting, I could choose which display the game started on :)
comment:16 by , 9 years ago
Milestone: | Alpha 18 → Alpha 19 |
---|
comment:17 by , 9 years ago
Milestone: | Alpha 19 |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
Closing as wontfix since SDL2 is now a reasonable option on Linux too.
I just tried it. It picks the correct primary display. (For me its the right of two displays.)
But it did not return cleanly. I quit pyrogenesis and it is no longer running. But the whole screen (both displays!) is black with the system cursor. (Had to restart X as I dont know how to recover from that.)
It also switches the second display off. (black/standby)
Other programs supporting xinerama are working fine for me.
(I can play 0ad in fullscreen if I select the fullscreen option kde offers me or:
kstart --fullscreen ./pyrogenesis -conf=windowed:true )
With SDL-2-rc1 its working fine without this patch ;)