Browse Source

examples/renderer/08-rotating-textures: Fix compiler warning on MSVC .

Ozkan Sezer 6 months ago
parent
commit
b736285053
1 changed files with 2 additions and 2 deletions
  1. 2 2
      examples/renderer/08-rotating-textures/rotating-textures.c

+ 2 - 2
examples/renderer/08-rotating-textures/rotating-textures.c

@@ -93,8 +93,8 @@ SDL_AppResult SDL_AppIterate(void *appstate)
     dst_rect.w = (float) texture_width;
     dst_rect.h = (float) texture_height;
     /* rotate it around the center of the texture; you can rotate it from a different point, too! */
-    center.x = texture_width / 2;
-    center.y = texture_height / 2;
+    center.x = texture_width / 2.0f;
+    center.y = texture_height / 2.0f;
     SDL_RenderTextureRotated(renderer, texture, NULL, &dst_rect, rotation, &center, SDL_FLIP_NONE);
 
     SDL_RenderPresent(renderer);  /* put it all on the screen! */