mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-17 15:21:43 +00:00
Rename SDL_GetDisplayDPI to SDL_GetDisplayPhysicalDPI
to avoid confusion with logical DPI
This commit is contained in:
@@ -1128,7 +1128,7 @@ SDLTest_CommonInit(SDLTest_CommonState *state)
|
||||
SDL_zero(usablebounds);
|
||||
SDL_GetDisplayUsableBounds(i, &usablebounds);
|
||||
|
||||
SDL_GetDisplayDPI(i, NULL, &hdpi, &vdpi);
|
||||
SDL_GetDisplayPhysicalDPI(i, NULL, &hdpi, &vdpi);
|
||||
|
||||
SDL_Log("Bounds: %dx%d at %d,%d\n", bounds.w, bounds.h, bounds.x, bounds.y);
|
||||
SDL_Log("Usable bounds: %dx%d at %d,%d\n", usablebounds.w, usablebounds.h, usablebounds.x, usablebounds.y);
|
||||
@@ -2296,8 +2296,8 @@ void SDLTest_CommonDrawWindowInfo(SDL_Renderer *renderer, SDL_Window *window, fl
|
||||
textY += lineHeight;
|
||||
}
|
||||
|
||||
if (0 == SDL_GetDisplayDPI(windowDisplayIndex, &ddpi, &hdpi, &vdpi)) {
|
||||
(void)SDL_snprintf(text, sizeof text, "SDL_GetDisplayDPI: ddpi: %f, hdpi: %f, vdpi: %f",
|
||||
if (0 == SDL_GetDisplayPhysicalDPI(windowDisplayIndex, &ddpi, &hdpi, &vdpi)) {
|
||||
(void)SDL_snprintf(text, sizeof text, "SDL_GetDisplayPhysicalDPI: ddpi: %f, hdpi: %f, vdpi: %f",
|
||||
ddpi, hdpi, vdpi);
|
||||
SDLTest_DrawString(renderer, 0.0f, textY, text);
|
||||
textY += lineHeight;
|
||||
|
Reference in New Issue
Block a user