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

update SDL_render_d3d12.c after DPI scaling/highdpi support patch. #5794

Merged
merged 1 commit into from
Jun 15, 2022

Conversation

sezero
Copy link
Contributor

@sezero sezero commented Jun 13, 2022

@chalonverse
Copy link
Contributor

At least on the d3d12 side of things, the renderer still seems to work fine. Not entirely sure how to test the highdpi support, though.

@ericwa
Copy link
Contributor

ericwa commented Jun 14, 2022

For testing the highdpi support, you'd:

  • set the SDL_WINDOWS_DPI_SCALING environment variable to 1 (or set the hint with SDL_SetHint)
  • launch a test app (I like to use SDL's testwm2)
  • change the Windows scale factor (right click on the desktop -> display settings -> scale and layout heading -> change the scale combobox e.g. from 100% to 125%)

The renderer surface size should change e.g. from 640x480 to 800x600 pixels, but the SDL window size should remain at 640x480 points.

@sezero
Copy link
Contributor Author

sezero commented Jun 15, 2022

Any results? Decision?

@chalonverse
Copy link
Contributor

I tried it out just now -- with that hint enabled and 150% scaling (which is what I use anyway), the window remains 640x480 but the viewport resolution is now 960x720. So, it seems to work as expected.

@slouken slouken merged commit 960b86d into libsdl-org:main Jun 15, 2022
@sezero sezero deleted the d3d12 branch June 15, 2022 04:52
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.

None yet

4 participants