Skip to content

Commit 4de3967

Browse files
committed
More clarification for high DPI support
1 parent 36fc1c2 commit 4de3967

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/README-highdpi.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ Observe the difference between the approaches taken by macOS and Windows:
3030

3131
Proper high DPI support takes into account both the content scale and the pixel density.
3232

33-
First, you'd create your window with the SDL_WINDOW_HIGH_PIXEL_DENSITY flag, assuming you want the highest detail possible. Then you'd get the display content scale to see how much your UI elements should be enlarged to be readable.
33+
First, you'd create your window with the `SDL_WINDOW_HIGH_PIXEL_DENSITY` flag, assuming you want the highest detail possible. Then you'd get the window display scale to see how much your UI elements should be enlarged to be readable.
3434

35-
If you're using the SDL 2D renderer, SDL provides the function SDL_ConvertEventToRenderCoordinates() to convert mouse coordinates between window coordinates and rendering coordinates, and the more general functions SDL_RenderCoordinatesFromWindow() and SDL_RenderCoordinatesToWindow() to convert between them.
35+
If you're using the SDL 2D renderer, SDL provides the function `SDL_ConvertEventToRenderCoordinates()` to convert mouse coordinates between window coordinates and rendering coordinates, and the more general functions `SDL_RenderCoordinatesFromWindow()` and `SDL_RenderCoordinatesToWindow()` to do other conversion between them.
3636

37-
If you're not using the 2D renderer, you can implement this yourself using SDL_GetWindowPixelDensity() as scale factor to convert from window coordinates to pixels.
37+
If you're not using the 2D renderer, you can implement this yourself using `SDL_GetWindowPixelDensity()` as scale factor to convert from window coordinates to pixels.
3838

3939
Finally you'll want to test on both Windows and macOS if possible to make sure your high DPI support works in all environments.
4040

0 commit comments

Comments
 (0)