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.14k stars 380 forks source link

[Bizhawk 2.10 rc1] client.SetGameExtraPadding causes stretching with NDS scaling #4039

Closed Brian0255 closed 7 hours ago

Brian0255 commented 14 hours ago

Summary

For melonDS, if either OpenGL renderer is selected and the Scale Factor is set higher than 1x, client.SetGameExtraPadding will stretch the emulator screen. When using this function in Bizhawk 2.9, the emulator screen does not stretch.

Repro

  1. Set the 3D Renderer to "OpenGL Classic" or "OpenGL Compute"
  2. Set "OpenGL Scale Factor" higher than 1
  3. Reboot the core and load an NDS ROM & Lua script with the following code:
    client.SetGameExtraPadding(0, 0, 250, 0)

Host env.

Screenshots

Brian0255 commented 14 hours ago

I should note, client.SetClientExtraPadding seems to work fine and doesn't have this problem. Perhaps I should just be using that instead?

EDIT: Never mind, I definitely need client.SetGameExtraPadding lol

CasualPokePlayer commented 12 hours ago

This would be some kind of breakage due to how this is handled. client.SetGameExtraPadding goes against the "emucore" surface, which for melonDS might be larger than the "client" surface if you end up setting the scale factor up (or more specifically, the Virtual resolution is smaller than the Buffer resolution). The intent is to more match how emulators de facto handle internal resolution scaling, where they don't increase the window resolution. I would assume some handling here does not like this unexpected relationship.

BizHawk 2.9 does not even have melonDS's OpenGL renderer, so it's not a valid comparison here.

You might be able to workaround it (somewhat) regardless using client.SetClientExtraPadding and watching the window scale with other apis.

CasualPokePlayer commented 11 hours ago

Note too, this issue likely also affects the Encore (3DS) core as it handles internal scaling the same way.