Browse Source

Show the display content scale in SDLTest_CommonDrawWindowInfo()

Sam Lantinga 3 months ago
parent
commit
ecf8dd054d
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/test/SDL_test_common.c

+ 4 - 0
src/test/SDL_test_common.c

@@ -2818,6 +2818,10 @@ void SDLTest_CommonDrawWindowInfo(SDL_Renderer *renderer, SDL_Window *window, fl
     SDLTest_DrawString(renderer, 0.0f, textY, text);
     textY += lineHeight;
 
+    (void)SDL_snprintf(text, sizeof(text), "SDL_GetDisplayContentScale: %g", SDL_GetDisplayContentScale(windowDisplayID));
+    SDLTest_DrawString(renderer, 0.0f, textY, text);
+    textY += lineHeight;
+
     /* Mouse */
 
     SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255);