Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Changed test program to be more compatible C.

  • Loading branch information
philippwiesemann committed Jul 27, 2013
1 parent e2146ca commit fa8002cd55cf949dd71f2906c0c2b0203b74d4bc
Showing with 6 additions and 3 deletions.
  1. +6 −3 test/testdrawchessboard.c
@@ -50,6 +50,9 @@ DrawChessBoard(SDL_Renderer * renderer)
int
main(int argc, char *argv[])
{
SDL_Window *window;
SDL_Surface *surface;
SDL_Renderer *renderer;

/* Initialize SDL */
if(SDL_Init(SDL_INIT_VIDEO) != 0)
@@ -60,14 +63,14 @@ main(int argc, char *argv[])


/* Create window and renderer for given surface */
SDL_Window *window = SDL_CreateWindow("Chess Board",SDL_WINDOWPOS_UNDEFINED,SDL_WINDOWPOS_UNDEFINED,640,480,SDL_WINDOW_SHOWN);
window = SDL_CreateWindow("Chess Board", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 640, 480, SDL_WINDOW_SHOWN);
if(!window)
{
fprintf(stderr,"Window creation fail : %s\n",SDL_GetError());
return 1;
}
SDL_Surface *surface = SDL_GetWindowSurface(window);
SDL_Renderer *renderer = SDL_CreateSoftwareRenderer(surface);
surface = SDL_GetWindowSurface(window);
renderer = SDL_CreateSoftwareRenderer(surface);
if(!renderer)
{
fprintf(stderr,"Render creation for surface fail : %s\n",SDL_GetError());

0 comments on commit fa8002c

Please sign in to comment.