mirror of
https://github.com/libsdl-org/SDL.git
synced 2024-11-23 02:43:30 +08:00
Sync SDL3 wiki -> header
[ci skip]
This commit is contained in:
parent
48ff3efdb9
commit
b676413657
@ -1,5 +1,5 @@
|
||||
|
||||
SDL 3.0 has new support for high DPI displays. Interfaces provided by SDL uses the platform's native coordinates unless otherwise specified.
|
||||
SDL 3.0 has new support for high DPI displays. Interfaces provided by SDL uses the platform's native coordinates unless otherwise specified.
|
||||
|
||||
To reconcile platform differences in their approach to high-density scaling, SDL provides the following interfaces:
|
||||
- `SDL_GetWindowSize()` retrieves the window dimensions in native coordinates.
|
||||
@ -24,7 +24,7 @@ Given a fullscreen window spanning a 3840x2160 monitor set to 2x display or 200%
|
||||
| `SDL_GetWindowPixelDensity()` | 1.0 | 2.0 | 1.0 |
|
||||
|
||||
Observe the philosophical difference between the approaches taken by MacOS and Win32:
|
||||
- Win32 coordinate system always deals in physical device pixels, high DPI support is achieved by providing an advisory hint for the developer to enlarge drawn objects. Ignoring the advisory scale factor results in graphics appearing tiny.
|
||||
- Win32 coordinate system always deals in physical device pixels, high DPI support is achieved by providing an advisory hint for the developer to enlarge drawn objects. Ignoring the advisory scale factor results in graphics appearing tiny.
|
||||
- MacOS coordinate system always deals in physical content sizes, high DPI support is achieved by providing an optional flag for the developer to request finer granularity. Omitting the granularity request results in graphics appearing coarse.
|
||||
|
||||
## Explanation
|
||||
|
Loading…
Reference in New Issue
Block a user