Adjusting DosBox Window behavior

Please post suggestions for improvement of Cinnamon on:
https://github.com/linuxmint/Cinnamon
Post Reply
xelaric7
Level 1
Level 1
Posts: 5
Joined: Wed Jan 15, 2020 1:42 pm

Adjusting DosBox Window behavior

Post by xelaric7 »

Im trying to create a setup for streaming where one display contains the game while my second display would be used to view the chat. Problem is DOsBox won't read mouse inputs if it's not full screen, and as soon as I make DosBox fullscreen, it automatically switches to a cloned display on both screens and lowers the screen resolution. and I have to reset the displays after every time I run it.

Is it possible to have DOSBox in full screen on one display while leaving the second display free to view a web browser or OBS?

I'm a relative newcomer to Linux so maybe the answer is staring me in the face and I just can't see it...any assistance would be appreciated

User avatar
xenopeek
Level 24
Level 24
Posts: 24283
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Adjusting DosBox Window behavior

Post by xenopeek »

How do you mean DOSBox won't read mouse inputs if it's not in full screen? Assuming you're playing a game in DOSBox that accepts mouse input, the mouse cursor should lock to the DOSBox window after you click inside the window. You can also press Ctrl+F10 with DOSBox window in focus to unlock/lock the mouse cursor to the window.
Image

xelaric7
Level 1
Level 1
Posts: 5
Joined: Wed Jan 15, 2020 1:42 pm

Re: Adjusting DosBox Window behavior

Post by xelaric7 »

It behaves that way on my windows computer, but on my Linux machine it's just a regular mouse cursor that can interact with the desktop when it's windowed but won't interact with whatever game I have running and no amount of clicking or pressing ctrl + F10 changes that. It will recognize keyboard inputs windowed and full screen, and it works fine when full screen.

Which isn't a huge deal, I usually play games with it full screen anyway. The bigger issue is it automatically changing my display settings every time I go into full screen; making it impossible for me to monitor a stream on the second display and constantly having to reconfigure my display

Also If I try to use a window capture in OBS, it records just fine if I keep DosBox windowed, but if I go into fullscreen it only records a black screen.
It's as if I'm not meant to be a streamer

User avatar
xenopeek
Level 24
Level 24
Posts: 24283
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Adjusting DosBox Window behavior

Post by xenopeek »

Here's a topic on the DOSBox developers forum about the same issue you have: https://www.vogons.org/viewtopic.php?f=31&t=62703. The workarounds suggested are fullscreen or set autolock=false in your dosbox.conf file. I'd give the latter a try; that should have seamless mouse integration. The mouse won't lock to the DOSBox window (you can move it in and out of the window) but it should show as the game's mouse pointer and send mouse click events when inside the window.

This is fixed in DOSBox but the fixed version is not on Linux Mint 19.x it seem; or more accurately it's not in the Ubuntu Bionic universe repository used by Linux Mint 19.x. Hopefully it will be in Ubuntu Focal on which Linux Mint 20 due mid this year will be based.

A final alternative would be to compile DOSBox from source which also gets you the fixed version.
Image

xelaric7
Level 1
Level 1
Posts: 5
Joined: Wed Jan 15, 2020 1:42 pm

Re: Adjusting DosBox Window behavior

Post by xelaric7 »

Dumb question but where is the configuration file....I've looked for it but can't seem to find it

User avatar
xenopeek
Level 24
Level 24
Posts: 24283
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Adjusting DosBox Window behavior

Post by xenopeek »

If you don't have a game specific config file, DOSBox uses the default config file in ~/.dosbox. Toggle viewing hidden files in your file manager (Ctrl+H) to see hidden directories like that. You can also just run this command to edit the config file with Xed (default Linux Mint text editor):
dosbox -editconf xed
Image

xelaric7
Level 1
Level 1
Posts: 5
Joined: Wed Jan 15, 2020 1:42 pm

Re: Adjusting DosBox Window behavior

Post by xelaric7 »

Setting autolock=false now makes the mouse cursor interact with the game when it hovers over the DosBox window, then go back to interacting with the desktop if it's outside the DosBox window...which is what i'd expect for autolock=true :lol:

Back to my other issue, is there a way to make DosBox stay on my primary display when in fullscreen mode instead of cloning it on both displays?

User avatar
xenopeek
Level 24
Level 24
Posts: 24283
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Adjusting DosBox Window behavior

Post by xenopeek »

That I don't know but I've had my range of issues with DOSBox fullscreen.

I just play windowed. In the config file I set:
fullscreen=false
windowresolution=WxH
output=opengl
And further down also set:
aspect=true
Replace WxH with desired width and height for the window. For example if you're playing an old VGA game at original 320x200 resolution, its aspect corrected resolution is 320x240 so set width and height to a whole multiple of that for best scaling. I use windowresolution=1280x960.
Image

xelaric7
Level 1
Level 1
Posts: 5
Joined: Wed Jan 15, 2020 1:42 pm

Re: Adjusting DosBox Window behavior

Post by xelaric7 »

I've noticed there's a bit of input lag when it's windowed vs fullscreen

Post Reply

Return to “Cinnamon”