comparison XCodeiPhoneOS/Demos/src/rectangles.c @ 3093:375ee92745e8

Fixed iPhone demos
author Sam Lantinga <slouken@libsdl.org>
date Tue, 17 Mar 2009 03:56:21 +0000
parents f55c87ae336b
children
comparison
equal deleted inserted replaced
3092:cad1aefa2ed9 3093:375ee92745e8
24 r = randomInt(50, 255); 24 r = randomInt(50, 255);
25 g = randomInt(50, 255); 25 g = randomInt(50, 255);
26 b = randomInt(50, 255); 26 b = randomInt(50, 255);
27 27
28 /* Fill the rectangle in the color */ 28 /* Fill the rectangle in the color */
29 SDL_RenderFill(r, g, b, 255, &rect); 29 SDL_SetRenderDrawColor(r, g, b, 255);
30 SDL_RenderFill(&rect);
30 31
31 /* update screen */ 32 /* update screen */
32 SDL_RenderPresent(); 33 SDL_RenderPresent();
33 34
34 } 35 }
59 if (SDL_CreateRenderer(windowID, -1, 0) != 0) { 60 if (SDL_CreateRenderer(windowID, -1, 0) != 0) {
60 fatalError("Could not create renderer"); 61 fatalError("Could not create renderer");
61 } 62 }
62 63
63 /* Fill screen with black */ 64 /* Fill screen with black */
64 SDL_RenderFill(0, 0, 0, 0, NULL); 65 SDL_SetRenderDrawColor(0, 0, 0, 255);
66 SDL_RenderFill(NULL);
65 67
66 /* Enter render loop, waiting for user to quit */ 68 /* Enter render loop, waiting for user to quit */
67 done = 0; 69 done = 0;
68 while (!done) { 70 while (!done) {
69 while (SDL_PollEvent(&event)) { 71 while (SDL_PollEvent(&event)) {