igorseabra4 / HeroesPowerPlant

Level editor for Sonic Heroes (PC, GameCube, XBOX, PS2) and Shadow the Hedgehog (GameCube, XBOX, PS2). Integrates editors for various file types with a 3D view of the stage.
27 stars 14 forks source link

[BUG] File Dialog Scaling Bug for "Scale and layout" > 100% #33

Closed dreamsyntax closed 8 months ago

dreamsyntax commented 2 years ago

Windows re-scale to 1x after an Ookii / FileDialog operation occurs for users with Scale and layout set to > 100%

Find what is different between these two open dialogs and why one has the scaling bug and the other doesn't.

This may be a Windows or .NET 6 bug, in which case would be unsolvable

Windows 10 -> Display Settings -> image

Steps to reproduce:

  1. Set Window "Scale and layout" to 125% scaling.
  2. Restart the PC
  3. Open HPP - Note the window size
  4. Open Level Editor
  5. Choose Open Heroes Level
  6. Pick something
  7. No Windows size change
  8. Close HPP
  9. Repeat step 3 and 4
  10. Choose "Open Shadow Level"

Note when the dialog for this appears, the Window scaling for the Main Form and the Level Editor Form will reduce in size to a 100% scaling style.

This is the bug.

dreamsyntax commented 2 years ago

Confirmed this is a Windows 10 exclusive bug (even 21H2). Windows 11 21H2 does not have it. Likely nothing to be done.

dreamsyntax commented 8 months ago

This appears to have regressed in newer Windows 11 builds (at least confirmed in 23H2). After re-evaluation likely the scaling was broken in Windows 11 21H2, so this is indeed a bug that can be resolved in our code. Reopening

dreamsyntax commented 8 months ago

Appears to be related to .NET Framework specifically. Since we only ship .NET Core versions after v0.10.0 This is resolved.

We migrated to Ookii in v0.11.0 as well, which fixed it for HeroesONE-R (which is still a .NET Framework 4.8 WinForms app)