Make some printf() calls into SDL_Log() so I can see them on Windows. :)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
diff --git a/src/test/SDL_test_common.c b/src/test/SDL_test_common.c
index e304a76..2c4cabc 100644
--- a/src/test/SDL_test_common.c
+++ b/src/test/SDL_test_common.c
@@ -1386,7 +1386,7 @@ SDLTest_CommonEvent(SDLTest_CommonState * state, SDL_Event * event, int *done)
if (current_win) {
const SDL_bool shouldCapture = (SDL_GetWindowFlags(current_win) & SDL_WINDOW_MOUSE_CAPTURE) == 0;
const int rc = SDL_CaptureMouse(shouldCapture);
- printf("%sapturing mouse %s!\n", shouldCapture ? "C" : "Unc", (rc == 0) ? "succeeded" : "failed");
+ SDL_Log("%sapturing mouse %s!\n", shouldCapture ? "C" : "Unc", (rc == 0) ? "succeeded" : "failed");
}
}
break;
diff --git a/test/testhittesting.c b/test/testhittesting.c
index 5d347ad..4ac535c 100644
--- a/test/testhittesting.c
+++ b/test/testhittesting.c
@@ -18,12 +18,12 @@ hitTest(SDL_Window *window, const SDL_Point *pt, void *data)
int i;
for (i = 0; i < numareas; i++) {
if (SDL_PointInRect(pt, &areas[i])) {
- printf("HIT-TEST: DRAGGABLE\n");
+ SDL_Log("HIT-TEST: DRAGGABLE\n");
return SDL_HITTEST_DRAGGABLE;
}
}
- printf("HIT-TEST: NORMAL\n");
+ SDL_Log("HIT-TEST: NORMAL\n");
return SDL_HITTEST_NORMAL;
}
@@ -40,7 +40,7 @@ int main(int argc, char **argv)
renderer = SDL_CreateRenderer(window, -1, 0);
if (SDL_SetWindowHitTest(window, hitTest, NULL) == -1) {
- fprintf(stderr, "Enabling hit-testing failed!\n");
+ SDL_Log("Enabling hit-testing failed!\n");
SDL_Quit();
return 1;
}
@@ -61,16 +61,16 @@ int main(int argc, char **argv)
switch (e.type)
{
case SDL_MOUSEBUTTONDOWN:
- printf("button down!\n");
+ SDL_Log("button down!\n");
break;
case SDL_MOUSEBUTTONUP:
- printf("button up!\n");
+ SDL_Log("button up!\n");
break;
case SDL_WINDOWEVENT:
if (e.window.event == SDL_WINDOWEVENT_MOVED) {
- printf("Window event moved to (%d, %d)!\n", (int) e.window.data1, (int) e.window.data2);
+ SDL_Log("Window event moved to (%d, %d)!\n", (int) e.window.data1, (int) e.window.data2);
}
break;