Commit 21d32975972152fad9af6173a5fadb5c0b56e56f

Philipp Wiesemann 2016-03-03T20:11:43

Fixed compile warnings about unused variables in IME test program.

diff --git a/test/testime.c b/test/testime.c
index ff1c529..d536bea 100644
--- a/test/testime.c
+++ b/test/testime.c
@@ -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
@@ -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
@@ -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])
@@ -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);