DOSBox in fullscreen disables second monitor

General information and assistance with DOSBox.

DOSBox in fullscreen disables second monitor

Postby quimkaos » 2019-9-02 @ 21:25

Hi all, every time i switch DOSBox to full screen, my second monitor gets disabled. Does anyone knows how to use DOSBox in fullscreen mode without disabling other monitors?
i'm using DOSBox in 0.74-3 in linux
i found another post in this forum (~5 years old) that didn't help.
quimkaos
Newbie
 
Posts: 2
Joined: 2019-9-02 @ 21:14

Re: DOSBox in fullscreen disables second monitor

Postby Dominus » 2019-9-02 @ 23:19

It's a problem of SDL 1.2.
Here is to hoping that the devs switch to SDL2 soon
User avatar
Dominus
DOSBox Moderator
 
Posts: 8024
Joined: 2002-10-03 @ 09:54
Location: Ludwigsburg

Re: DOSBox in fullscreen disables second monitor

Postby DosFreak » 2019-9-03 @ 00:09

Can you try changing fullresolution in dosbox.conf to desktop, verify DOSBox is actually using this config on load and see if the same issue occurs?
If you've only found one other post then either it doesn't happen that often or no one reports it.
User avatar
DosFreak
l33t++
 
Posts: 10532
Joined: 2002-6-30 @ 16:35
Location: Your Head

Re: DOSBox in fullscreen disables second monitor

Postby krcroft » 2019-9-03 @ 02:07

Dominus wrote:It's a problem of SDL 1.2.
Here is to hoping that the devs switch to SDL2 soon

Indeed, 1.2 doesn't handle multiple displays without kludges; alas: https://forums.libsdl.org/viewtopic.php?p=31144

Incase the link or forum goes down, here's a copy for future-reference:
Posted: Tue Dec 20, 2011 5:18 pm by René Dudfield

On Mon, Dec 19, 2011 at 10:08 PM, Julian Mayer wrote:

hello all
first of all - thanks for SDL!

i've written a game that uses SDL for creating an OpenGL context under Windows and Linux. while everything seems to work fine on single-monitor systems, i've received a report from a linux user that the game actually spans both displays, while he only wants it displayed on the second display.

his setup: "Kubuntu 11.10 x64 with R600g video driver / Laptop Acer 7560G with external FullHD 27" display attached via HDMI. Configured via xrandr."

after some googling i've told him to try these variables:

SDL_VIDEO_FULLSCREEN_HEAD
SDL_VIDEO_X11_XINERAMA
SDL_VIDEO_X11_XINERAMA_SCREEN
SDL_VIDEO_X11_XRANDR

but he said even launching the game with SDL_VIDEO_FULLSCREEN_HEAD=1 doesn't fix the issue...any suggestions?

one issue seems to be that SDL_GetVideoInfo() returns the resolution of BOTH displays combined, i.e. [url=tel:3520%20x%201080]3520 x 1080[/url] ... shouldn't it return the resolution of the primary display?
(the rationale here is that calling SDL_SetVideoMode(info->current_w, info->current_h, 24, SDL_OPENGL | SDL_FULLSCREEN) should yield a usable fullscreen context on the main display and not some weird problem context that spans two displays)

however that can't be responsible for all problems seen here as he said even when forcing the game to a lower resolution, windowed mode and FULLSCREEN_HEAD=1 it still spans both displays.

so are there any suggestions how to make SDL work fine with a multi monitor setup on linux?

thanks, julian

btw: it seems like NONE of the environment variables listed above are documented

Hi,

One hack is to see the aspect ratio is very wide, and if so use half(or a division of a standardish aspect if they have 3 monitors) the width. Then set the position of the window based on that guess. Use the SDL_VIDEO_WINDOW_POS="x,y" environment variable to set the position (then re-init).

Otherwise, SDL 1.2 does not do multiple monitors.

Or wait for SDL 1.3 to be released ; Because that supports multi-monitors on some platforms.

cu!
User avatar
krcroft
Member
 
Posts: 421
Joined: 2017-4-29 @ 15:07
Location: Ogden's Retreat

Re: DOSBox in fullscreen disables second monitor

Postby quimkaos » 2019-9-03 @ 13:56

thanks for all the replies!
@DosFreak yes i'm using the correct .conf file. setting fullresolution to desktop spans dos box thru all monitors. original uses the main monitor and disable others (the monitor goes in to power saving mode). Fixed size behaves as original does.

i've been searching a bit more and all points to SLD 1.2, and that probably wont be addressed by devs...
quimkaos
Newbie
 
Posts: 2
Joined: 2019-9-02 @ 21:14

Re: DOSBox in fullscreen disables second monitor

Postby DosFreak » 2019-9-03 @ 14:09

Yeah just wanted to verify thanks. DOSBox will switch to SDL2 eventually but from what I can see for this and the dropped key issue modifying the code to maximize the window instead of switching to fullscreen would likely fix both issues on SDL 1.2.

I do find it strange this hasn't been reported more often though. Mabye number of Linux users using DOSBox and with multiple monitors and using fullscreen is pretty low?
User avatar
DosFreak
l33t++
 
Posts: 10532
Joined: 2002-6-30 @ 16:35
Location: Your Head

Re: DOSBox in fullscreen disables second monitor

Postby Roger Wilco » 2019-9-05 @ 22:27

I had similar issues when connecting a CRT to my laptop, for the good old brain melt.
It took a while to figure out, how to get the fullscreen dosbox working on the CRT. No problems with window mode.
I tried a LOT of settings, in both Linux and Dosbox, but the fullscreen always appeared on the main screen.
I think, the only "solution" was to display same content on both monitors and adjust resolution as needed by the CRT.

Running latest stable Debian, tried this with Dosbox from the official repos.
User avatar
Roger Wilco
Newbie
 
Posts: 54
Joined: 2016-6-03 @ 14:33

Re: DOSBox in fullscreen disables second monitor

Postby dreamer_ » 2019-9-08 @ 13:22

It's rather easy to work around this using SDL environment variables and proper .conf file. I do it automatically in https://github.com/dreamer/boxtron/ to place DOSBox in fullscreen on monitor user prefers.

DOSBox really needs to switch to SDL2 by default at this point.
Code: Select all
| ← Ceci n'est pas une pipe
User avatar
dreamer_
Newbie
 
Posts: 70
Joined: 2019-5-17 @ 20:19


Return to DOSBox General

Who is online

Users browsing this forum: MSN [Bot] and 2 guests