Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows DPI awareness #365

Merged
merged 6 commits into from
Feb 1, 2024
Merged

Windows DPI awareness #365

merged 6 commits into from
Feb 1, 2024

Conversation

Spodi
Copy link
Contributor

@Spodi Spodi commented Nov 9, 2023

  • Handle DPI specific window messages when DPI aware in DirectX renderer.
  • Circumvent SDLs seemingly broken handling of some window messages when DPI aware (OpenGL renderer).

This PR pushes the responsibility of making the Windows app DPI aware to the port, so we need to change the Windows app manifest on the ports side, to tell Windows that we can handle it.

Therefore also needs SoH PR: HarbourMasters/Shipwright#3270 <- this includes this LUS change for GitHub to generate a test build

@Spodi Spodi changed the title Make app fully DPI aware Windows DPI awareness Nov 24, 2023
@Spodi Spodi marked this pull request as ready for review November 24, 2023 07:23
@Spodi Spodi force-pushed the win-dpi-aware branch 2 times, most recently from d848629 to 974a39d Compare November 24, 2023 18:58
@Spodi Spodi force-pushed the win-dpi-aware branch 2 times, most recently from 60b8068 to 9fe0923 Compare December 13, 2023 05:34
Use a manifest that declares DPI-awareness for the game instead.
Something is wrong with SDLs original implementation of  WM_GETDPISCALEDSIZE, so pass it to the default system window procedure.

Should fix window scaling when DPI changes.
@Kenix3 Kenix3 merged commit 6a83dbf into Kenix3:main Feb 1, 2024
4 checks passed
@Spodi Spodi deleted the win-dpi-aware branch February 24, 2024 10:52
@briaguya-ai briaguya-ai mentioned this pull request Apr 9, 2024
Spodi added a commit to Spodi/libultraship that referenced this pull request Jul 25, 2024
* Handle WM_DPICHANGED

* Don't run as DPI-aware process here.

Use a manifest that declares DPI-awareness for the game instead.

* Override SDLs window procedure in Windows

Something is wrong with SDLs original implementation of  WM_GETDPISCALEDSIZE, so pass it to the default system window procedure.

Should fix window scaling when DPI changes.

* Fix building on non-Windows

* Comment some stuff

* Remove now unused run_as_dpi_aware()
Kenix3 pushed a commit that referenced this pull request Aug 1, 2024
* Handle WM_DPICHANGED

* Don't run as DPI-aware process here.

Use a manifest that declares DPI-awareness for the game instead.

* Override SDLs window procedure in Windows

Something is wrong with SDLs original implementation of  WM_GETDPISCALEDSIZE, so pass it to the default system window procedure.

Should fix window scaling when DPI changes.

* Fix building on non-Windows

* Comment some stuff

* Remove now unused run_as_dpi_aware()
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.

2 participants