TASEmulators / BizHawk

BizHawk is a multi-system emulator written in C#. BizHawk provides nice features for casual gamers such as full screen, and joypad support in addition to full rerecording and debugging tools for all system cores.
http://tasvideos.org/BizHawk.html
Other
2.2k stars 385 forks source link

Add option to disable automatic resize of main window #4011

Closed kalimag closed 2 months ago

kalimag commented 3 months ago

This feature is useful for streamers who want a consistent capture size, as well as for people who want to fit the BizHawk window into a fixed layout with other windows (corner snapping etc.).

This is not the same functionality as the custom resolution in the display settings, which stretches the framebuffer to the specified size and fits the window to that size exactly.

With the feature in this PR, the window/client area stays a consistent size while automatic letterboxing/pillarboxing, integer resizing, 1:1 pixels etc. still work. This is preferable for working with multiple games, resolution changes mid-game, changing DS/WS screen rotation/layouts and similar, where squeezing everything into the same resolution is undesirable. It's also just more convenient than figuring out a resolution in the right aspect ratio and entering that in the display settings all the time.

Check if completed:

resolves #1560, #3039, and #3410

YoshiRulz commented 2 months ago

Adding

 typeof(object),
+typeof(Point),
 typeof(Queue<>),
 typeof(/*Single*/float),
+typeof(Size),
 typeof(string),

to https://github.com/TASEmulators/BizHawk/blob/dc582a4e7a1bc688a6eb6fdf8427fb9736bf10c9/src/BizHawk.Tests/Client.Common/config/SerializationStabilityTests.cs#L34-L37 should fix the test failure.

kalimag commented 2 months ago

Point and Size serialization will have to be re-tested on #3932

kalimag commented 2 months ago

LGTM now, so I've made a note to merge this before the upcoming RC.

Thanks for all the contributions recently.

Well, I finally had to stop procrastinating to get any of this into a release before 2.10.1 in December 2025 ;)

kalimag commented 2 months ago

I have a few more changes that I didn't PR yet because of the merge conflicts with(out) this PR: https://github.com/kalimag/BizHawk/compare/pr/disable-automatic-resize...kalimag:BizHawk:pr/disable-automatic-resize-plus

Should I wait until this one is merged and open a new PR, or just push them into this PR?

YoshiRulz commented 2 months ago

I don't follow. Merge conflicts with master? You're welcome to rewrite history and force push, just comment with what you changed compared to the old HEAD.

kalimag commented 2 months ago

What I mean is that those changes are not strictly related to this PR, but the commits touch the same code and are based on this PR's branch rather than master.

So I can't trivially open a separate PR with just those changes without (probably) creating a bunch of merge conflicts between the two PRs, and the easier option is to either have one PR (this one) containing all changes, or wait until this one is merged to open a second PR.

skywind3000 commented 2 months ago

Thanks, but I still can't find the new option to keep the window size:

图片

I am using the latest BizHawk-2.10-rc1-win-x64.zip

YoshiRulz commented 2 months ago

View > Window Size > Static Size

skywind3000 commented 2 months ago

thanks, that’s really helpful. Why not make it enabled by default?