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

Fixed iPhone demos
author Sam Lantinga <slouken@libsdl.org>
date Tue, 17 Mar 2009 03:56:21 +0000
parents f55c87ae336b
children 7f684f249ec9
comparison
equal deleted inserted replaced
3092:cad1aefa2ed9 3093:375ee92745e8
165 /* draws buttons to screen */ 165 /* draws buttons to screen */
166 void 166 void
167 render(void) 167 render(void)
168 { 168 {
169 int i; 169 int i;
170 SDL_RenderFill(50, 50, 50, 255, NULL); /* draw background (gray) */ 170 SDL_SetRenderDrawColor(50, 50, 50, 255);
171 SDL_RenderFill(NULL); /* draw background (gray) */
171 /* draw the drum buttons */ 172 /* draw the drum buttons */
172 for (i = 0; i < NUM_DRUMS; i++) { 173 for (i = 0; i < NUM_DRUMS; i++) {
173 SDL_Color color = 174 SDL_Color color =
174 buttons[i].isPressed ? buttons[i].downColor : buttons[i].upColor; 175 buttons[i].isPressed ? buttons[i].downColor : buttons[i].upColor;
175 SDL_RenderFill(color.r, color.g, color.b, color.unused, 176 SDL_SetRenderDrawColor(color.r, color.g, color.b, color.unused);
176 &buttons[i].rect); 177 SDL_RenderFill(&buttons[i].rect);
177 } 178 }
178 /* update the screen */ 179 /* update the screen */
179 SDL_RenderPresent(); 180 SDL_RenderPresent();
180 } 181 }
181 182