Skip to content

Commit

Permalink
Fixed compile warnings about unused variables in IME test program.
Browse files Browse the repository at this point in the history
  • Loading branch information
philippwiesemann committed Mar 3, 2016
1 parent be34036 commit 21d3297
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions test/testime.c
Expand Up @@ -29,8 +29,10 @@
static SDLTest_CommonState *state;
static SDL_Rect textRect, markedRect;
static SDL_Color lineColor = {0,0,0,0};
static SDL_Color backColor = {255,255,255,0};
static SDL_Color backColor = {255,255,255,255};
#ifdef HAVE_SDL_TTF
static SDL_Color textColor = {0,0,0,0};
#endif
static char text[MAX_TEXT_LENGTH], markedText[SDL_TEXTEDITINGEVENT_TEXT_SIZE];
static int cursor = 0;
#ifdef HAVE_SDL_TTF
Expand Down Expand Up @@ -113,7 +115,7 @@ void _Redraw(SDL_Renderer * renderer) {
int w = 0, h = textRect.h;
SDL_Rect cursorRect, underlineRect;

SDL_SetRenderDrawColor(renderer, 255,255,255,255);
SDL_SetRenderDrawColor(renderer, backColor.r, backColor.g, backColor.b, backColor.a);
SDL_RenderFillRect(renderer,&textRect);

#ifdef HAVE_SDL_TTF
Expand Down Expand Up @@ -148,7 +150,7 @@ void _Redraw(SDL_Renderer * renderer) {
cursorRect.w = 2;
cursorRect.h = h;

SDL_SetRenderDrawColor(renderer, 255,255,255,255);
SDL_SetRenderDrawColor(renderer, backColor.r, backColor.g, backColor.b, backColor.a);
SDL_RenderFillRect(renderer,&markedRect);

if (markedText[0])
Expand Down Expand Up @@ -182,11 +184,11 @@ void _Redraw(SDL_Renderer * renderer) {
underlineRect.h = 2;
underlineRect.w = w;

SDL_SetRenderDrawColor(renderer, 0,0,0,0);
SDL_SetRenderDrawColor(renderer, lineColor.r, lineColor.g, lineColor.b, lineColor.a);
SDL_RenderFillRect(renderer,&markedRect);
}

SDL_SetRenderDrawColor(renderer, 0,0,0,0);
SDL_SetRenderDrawColor(renderer, lineColor.r, lineColor.g, lineColor.b, lineColor.a);
SDL_RenderFillRect(renderer,&cursorRect);

SDL_SetTextInputRect(&markedRect);
Expand Down

0 comments on commit 21d3297

Please sign in to comment.