Skip to content
Permalink
Browse files

iOS: Fixed compiling template on C89 compilers.

  • Loading branch information
philippwiesemann committed Mar 19, 2017
1 parent 34a2a46 commit 6bd87635ee63b594a9347337a78ec0034fc8f3b1
Showing with 3 additions and 1 deletion.
  1. +3 −1 Xcode-iOS/Template/SDL iOS Application/main.c
@@ -5,6 +5,8 @@
*/

#include "SDL.h"
#include <stdio.h>
#include <stdlib.h>
#include <time.h>

#define SCREEN_WIDTH 320
@@ -20,14 +22,14 @@ void
render(SDL_Renderer *renderer)
{

SDL_Rect rect;
Uint8 r, g, b;

/* Clear the screen */
SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255);
SDL_RenderClear(renderer);

/* Come up with a random rectangle */
SDL_Rect rect;
rect.w = randomInt(64, 128);
rect.h = randomInt(64, 128);
rect.x = randomInt(0, SCREEN_WIDTH);

0 comments on commit 6bd8763

Please sign in to comment.