# HG changeset patch # User Sam Lantinga # Date 1237262181 0 # Node ID 375ee92745e8bf6c3b826e4c2e1580b4c6cbfaf5 # Parent cad1aefa2ed907f247127480d34068b69f7f5c72 Fixed iPhone demos diff -r cad1aefa2ed9 -r 375ee92745e8 XCodeiPhoneOS/Demos/src/happy.c --- a/XCodeiPhoneOS/Demos/src/happy.c Tue Mar 17 03:24:22 2009 +0000 +++ b/XCodeiPhoneOS/Demos/src/happy.c Tue Mar 17 03:56:21 2009 +0000 @@ -58,7 +58,8 @@ dstRect.h = HAPPY_FACE_SIZE; /* fill background in with black */ - SDL_RenderFill(0, 0, 0, 255, NULL); + SDL_SetRenderDrawColor(0, 0, 0, 255); + SDL_RenderFill(NULL); /* loop through all the happy faces: diff -r cad1aefa2ed9 -r 375ee92745e8 XCodeiPhoneOS/Demos/src/keyboard.c --- a/XCodeiPhoneOS/Demos/src/keyboard.c Tue Mar 17 03:24:22 2009 +0000 +++ b/XCodeiPhoneOS/Demos/src/keyboard.c Tue Mar 17 03:56:21 2009 +0000 @@ -174,8 +174,8 @@ drawBlank(int x, int y) { SDL_Rect rect = { x, y, GLYPH_SIZE_SCREEN, GLYPH_SIZE_SCREEN }; - SDL_RenderFill(bg_color.r, bg_color.g, bg_color.b, bg_color.unused, - &rect); + SDL_SetRenderDrawColor(bg_color.r, bg_color.g, bg_color.b, bg_color.unused); + SDL_RenderFill(&rect); } /* moves backwards one character, erasing the last one put down */ @@ -254,7 +254,8 @@ loadFont(); /* draw the background, we'll just paint over it */ - SDL_RenderFill(bg_color.r, bg_color.g, bg_color.b, bg_color.unused, NULL); + SDL_SetRenderDrawColor(bg_color.r, bg_color.g, bg_color.b, bg_color.unused); + SDL_RenderFill(NULL); SDL_RenderPresent(); int done = 0; diff -r cad1aefa2ed9 -r 375ee92745e8 XCodeiPhoneOS/Demos/src/mixer.c --- a/XCodeiPhoneOS/Demos/src/mixer.c Tue Mar 17 03:24:22 2009 +0000 +++ b/XCodeiPhoneOS/Demos/src/mixer.c Tue Mar 17 03:56:21 2009 +0000 @@ -167,13 +167,14 @@ render(void) { int i; - SDL_RenderFill(50, 50, 50, 255, NULL); /* draw background (gray) */ + SDL_SetRenderDrawColor(50, 50, 50, 255); + SDL_RenderFill(NULL); /* draw background (gray) */ /* draw the drum buttons */ for (i = 0; i < NUM_DRUMS; i++) { SDL_Color color = buttons[i].isPressed ? buttons[i].downColor : buttons[i].upColor; - SDL_RenderFill(color.r, color.g, color.b, color.unused, - &buttons[i].rect); + SDL_SetRenderDrawColor(color.r, color.g, color.b, color.unused); + SDL_RenderFill(&buttons[i].rect); } /* update the screen */ SDL_RenderPresent(); diff -r cad1aefa2ed9 -r 375ee92745e8 XCodeiPhoneOS/Demos/src/rectangles.c --- a/XCodeiPhoneOS/Demos/src/rectangles.c Tue Mar 17 03:24:22 2009 +0000 +++ b/XCodeiPhoneOS/Demos/src/rectangles.c Tue Mar 17 03:56:21 2009 +0000 @@ -26,7 +26,8 @@ b = randomInt(50, 255); /* Fill the rectangle in the color */ - SDL_RenderFill(r, g, b, 255, &rect); + SDL_SetRenderDrawColor(r, g, b, 255); + SDL_RenderFill(&rect); /* update screen */ SDL_RenderPresent(); @@ -61,7 +62,8 @@ } /* Fill screen with black */ - SDL_RenderFill(0, 0, 0, 0, NULL); + SDL_SetRenderDrawColor(0, 0, 0, 255); + SDL_RenderFill(NULL); /* Enter render loop, waiting for user to quit */ done = 0; diff -r cad1aefa2ed9 -r 375ee92745e8 XCodeiPhoneOS/Demos/src/touch.c --- a/XCodeiPhoneOS/Demos/src/touch.c Tue Mar 17 03:24:22 2009 +0000 +++ b/XCodeiPhoneOS/Demos/src/touch.c Tue Mar 17 03:56:21 2009 +0000 @@ -95,7 +95,8 @@ initializeTexture(); /* fill canvass initially with all black */ - SDL_RenderFill(0, 0, 0, 255, NULL); + SDL_SetRenderDrawColor(0, 0, 0, 255); + SDL_RenderFill(NULL); SDL_RenderPresent(); done = 0;