Explorar o código

Show the display content scale in SDLTest_CommonDrawWindowInfo()

Sam Lantinga hai 8 meses
pai
achega
ecf8dd054d
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  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);