Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Changed test program to be more compatible C.
  • Loading branch information
philippwiesemann committed Jul 27, 2013
1 parent e2146ca commit fa8002c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/testdrawchessboard.c
Expand Up @@ -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)
Expand All @@ -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());
Expand Down

0 comments on commit fa8002c

Please sign in to comment.