Skip to content

Conversation

@andresdelcampo
Copy link
Contributor

Summary

With the current 4:3 resizing logic, maximizing the window would maximize horizontally and leave part of the window outside the screen. It seems to be desired that the resizing happens in the content -like PCEm- and not the window. See new comment in previous PR #6062 (comment) requesting the change.

The previous approach could also become glitchy, especially when trying to reduce the window size, which is solved by this new approach.

Therefore, this PR changes window resizing logic when using 4:3 aspect ratio to resize content only instead of resizing the window. Also fixed issues in Remember size and position that are derived from the change.

Known issues:

  • Present in 86Box 5.0: When opening a VM with Resizable window and no Remember size, the window appears at 320:200 -stretched or not depending on 4:3 ratio -or always stretched in 5.0.
  • Present in 86Box 5.0: When in fullscreen, always uses 4:3 ratio independently of the menu option. Ok with me...
  • There is a slight flicker while resizing with force 4:3 aspect ratio.

Tested
In Windows with multiple combinations of

  • Force aspect 4:3
  • Remember size and position -and reopening the machine
  • Resizable screen - with and without force aspect and remember size, etc.
  • Fullscreen -back and forth with different settings

Checklist

References

Provide links to datasheets or other documentation that helped you implement this pull request.

Change window resizing logic when using 4:3 aspect ratio to resize content only. Fixed issues in Remember size and position that are derived from the change. There is a slight flicker while resizing with force 4:3 aspect ratio.
@Kappa971
Copy link
Contributor

I know it's not 100% relevant to this PR but just to point out, as I already did with one of the developers in a discussion I opened, that the current 4:3 scaling is far from ideal for several reasons.

@OBattler OBattler merged commit bc085ac into 86Box:master Sep 27, 2025
45 checks passed
@OBattler
Copy link
Member

This has introduced the following regression, reposting from the Discord server:

There is no error in build 7865. In build 7866, if the "Specify main window dimensions - Lock to this size" option is disabled, if "Hide toolbar" and "Hide status bar" are disabled, and if the "Force 4:3 display ratio" option is enabled, then the window coordinates are not saved (the last number is reset in the window_coordinates line) in the 86Box.cfg file when the machine starts:
[Monitor #1]
window_coordinates = 780, 330, 1024, 768

to
[Monitor #1]
window_coordinates = 780, 330, 1024, 837

Each time the machine starts, black horizontal frames will appear and grow larger at the top and bottom of the window, and the window itself will shift to the bottom of the screen. This will reset the window coordinates in the 86Box.cfg file:
[Monitor #1]
window_coordinates = 750, 95, 1024, 1182

@andresdelcampo
Copy link
Contributor Author

This has introduced the following regression, reposting from the Discord server:

There is no error in build 7865. In build 7866, if the "Specify main window dimensions - Lock to this size" option is disabled, if "Hide toolbar" and "Hide status bar" are disabled, and if the "Force 4:3 display ratio" option is enabled, then the window coordinates are not saved (the last number is reset in the window_coordinates line) in the 86Box.cfg file when the machine starts: [Monitor #1] window_coordinates = 780, 330, 1024, 768

to [Monitor #1] window_coordinates = 780, 330, 1024, 837

Each time the machine starts, black horizontal frames will appear and grow larger at the top and bottom of the window, and the window itself will shift to the bottom of the screen. This will reset the window coordinates in the 86Box.cfg file: [Monitor #1] window_coordinates = 750, 95, 1024, 1182

Damn... On it.

Cacodemon345 added a commit to Cacodemon345/86Box that referenced this pull request Oct 1, 2025
OBattler pushed a commit that referenced this pull request Oct 1, 2025
…viour (#6264)

* Revert "Fix remember size and position regression in which vertical size could grow when reopening the VM (#6239)"

This reverts commit 74aa156.

* Revert "Change window resizing logic when using 4:3 aspect ratio (#6233)"

This reverts commit bc085ac.

* Revert "Run more iterations and retested"

This reverts commit ca429dd.

* Revert "Fix Force 4:3 Aspect Ratio not working if Resizable window is enabled #6062"

This reverts commit 717b66c.

* Implement Force 4:3 option for resizable windows with fullscreen behaviour
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Minor: Force 4:3 Aspect Ratio not working if Resizable window is enabled

3 participants