Dosbox-x: SDL 1.x: Maximizing the window should maximize the window and stretch (with or without aspect ratio correction) the screen to fill the window.

Created on 18 Jan 2018  路  9Comments  路  Source: joncampbell123/dosbox-x

On latest builds (on build 2017-12-25 and later:
https://github.com/joncampbell123/dosbox-x/releases/tag/dosbox-x-0.82.1
Expanding Dosbox window in Direct3d output now opening Fullscreen mode instead of just expanding in Windowed mode
On builds 2017-12-24 or earlier:
https://github.com/joncampbell123/dosbox-x/releases/tag/dosbox-x-windows-20171224
Window expanding normally.

Seems that commit brokes that behavor:
https://github.com/joncampbell123/dosbox-x/commit/b7c507dce925ae92e35122dfbb3efd1f24af737f

All 9 comments

That was intentional, yes. Maximizing the window for OpenGL and other output modes triggers fullscreen, so Direct3D should do the same.

Also, Direct3D in a maximized window stretches to fill (and distort the aspect ratio) within the window.

Oh, that's very bad intention and unuseful now. I always prefered to set Direct3d just because of that great feature - maximized widowed mode (even distorted in aspect ratio) instead of fullscreen that very slow to switch task.
If someone want to go fullscreen - he will press Alt-Enter. Please - return this behavor back how it was...
I even prefer it in in OpenGL and DDRAW modes - maximizing window instead of fullscreen

I think what I'll do then is re-add it back, but for all modes if possible, and if the "aspect ratio" setting is on, to center the image in the window as well.

Agree, this will be useful to auto resize maximized window if forced aspect mode on)

In the development branch, I just fixed the code to let the window maximize rather than trigger fullscreen, and I managed to hack the Direct3D code to maintain aspect ratio when the window is maximized.

Do understand that OpenGL and Surface outputs haven't been updated the same yet and currently broken with a maximized window.

Commit:
https://github.com/joncampbell123/dosbox-x/commit/a6b3e7f95488ec0dd9eeb2ff85123d2a4a0ede87

and another commit, to do the same with OpenGL output

I'll post a binary soon for you to test. Direct3D and OpenGL output has been updated to work properly with a maximized window instead of going fullscreen. The surface output has been updated to center in the window properly in the same case.

Binaries posted. Let me know if the changes are satisfactory enough to close this issue.

Thanks! Tested, everything works as it should be. On forced aspect it corrects in windowed mode.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maximus105 picture maximus105  路  18Comments

kcgen picture kcgen  路  11Comments

forthrin picture forthrin  路  20Comments

Corak667 picture Corak667  路  7Comments

almeath picture almeath  路  18Comments