Browse Source

examples/misc/02-clipboard: Patched to compile on Visual Studio.

Ryan C. Gordon 1 week ago
parent
commit
2f30f7a6bd
1 changed files with 2 additions and 2 deletions
  1. 2 2
      examples/misc/02-clipboard/clipboard.c

+ 2 - 2
examples/misc/02-clipboard/clipboard.c

@@ -64,7 +64,7 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
 
     copybuttonrect.x = currenttimerect.x + currenttimerect.w + 30;
     copybuttonrect.y = currenttimerect.y;
-    copybuttonrect.w = (SDL_DEBUG_TEXT_FONT_CHARACTER_SIZE * SDL_strlen(copybuttonstr)) + 10;
+    copybuttonrect.w = (float) ((SDL_DEBUG_TEXT_FONT_CHARACTER_SIZE * SDL_strlen(copybuttonstr)) + 10);
     copybuttonrect.h = currenttimerect.h;
 
     pastetextrect.x = 10;
@@ -72,7 +72,7 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
     pastetextrect.w = 620;
     pastetextrect.h = ((480 - pastetextrect.y) - copybuttonrect.h) - 20;
 
-    pastebuttonrect.w = (SDL_DEBUG_TEXT_FONT_CHARACTER_SIZE * SDL_strlen(pastebuttonstr)) + 10;
+    pastebuttonrect.w = (float) ((SDL_DEBUG_TEXT_FONT_CHARACTER_SIZE * SDL_strlen(pastebuttonstr)) + 10);
     pastebuttonrect.x = (640 - pastebuttonrect.w) / 2.0f;
     pastebuttonrect.y = pastetextrect.y + pastetextrect.h + 10;
     pastebuttonrect.h = copybuttonrect.h;