sdl2-compat: sync tests with latest SDL2.

From 0bac572fb65611093bc4a16f57b6ab5e850cf759 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Wed, 13 Dec 2023 06:55:40 +0300
Subject: [PATCH] sync tests with latest SDL2.

---
 test/testautomation_video.c |  1 -
 test/testdrawchessboard.c   |  1 +
 test/testgamecontroller.c   |  1 +
 test/testgl2.c              | 10 +++++++++-
 4 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/test/testautomation_video.c b/test/testautomation_video.c
index 9a63be3..1e78039 100644
--- a/test/testautomation_video.c
+++ b/test/testautomation_video.c
@@ -1438,7 +1438,6 @@ int video_getSetWindowSize(void *arg)
                 }
             }
 
-
             /* Get just width */
             currentW = desiredW + 1;
             SDL_GetWindowSize(window, &currentW, NULL);
diff --git a/test/testdrawchessboard.c b/test/testdrawchessboard.c
index b46c913..ac9c77c 100644
--- a/test/testdrawchessboard.c
+++ b/test/testdrawchessboard.c
@@ -50,6 +50,7 @@ void DrawChessBoard()
             SDL_RenderFillRect(renderer, &rect);
         }
     }
+    SDL_RenderPresent(renderer);
 }
 
 void loop()
diff --git a/test/testgamecontroller.c b/test/testgamecontroller.c
index 19edb28..e19d1eb 100644
--- a/test/testgamecontroller.c
+++ b/test/testgamecontroller.c
@@ -221,6 +221,7 @@ static void AddController(int device_index, SDL_bool verbose)
         const char *name = SDL_GameControllerName(gamecontroller);
         const char *path = SDL_GameControllerPath(gamecontroller);
         SDL_Log("Opened game controller %s%s%s\n", name, path ? ", " : "", path ? path : "");
+        SDL_Log("Mapping: %s\n", SDL_GameControllerMapping(gamecontroller));
     }
 
     firmware_version = SDL_GameControllerGetFirmwareVersion(gamecontroller);
diff --git a/test/testgl2.c b/test/testgl2.c
index 42afc35..be32713 100644
--- a/test/testgl2.c
+++ b/test/testgl2.c
@@ -214,6 +214,11 @@ Render()
     ctx.glRotatef(5.0, 1.0, 1.0, 1.0);
 }
 
+static void LogSwapInterval(void)
+{
+    SDL_Log("Swap Interval : %d\n", SDL_GL_GetSwapInterval());
+}
+
 int main(int argc, char *argv[])
 {
     int fsaa, accel;
@@ -309,7 +314,9 @@ int main(int argc, char *argv[])
 
     SDL_GetCurrentDisplayMode(0, &mode);
     SDL_Log("Screen BPP    : %" SDL_PRIu32 "\n", SDL_BITSPERPIXEL(mode.format));
-    SDL_Log("Swap Interval : %d\n", SDL_GL_GetSwapInterval());
+
+    LogSwapInterval();
+
     SDL_GetWindowSize(state->windows[0], &dw, &dh);
     SDL_Log("Window Size   : %d,%d\n", dw, dh);
     SDL_GL_GetDrawableSize(state->windows[0], &dw, &dh);
@@ -417,6 +424,7 @@ int main(int argc, char *argv[])
             SDL_GL_MakeCurrent(state->windows[i], context);
             if (update_swap_interval) {
                 SDL_GL_SetSwapInterval(swap_interval);
+                LogSwapInterval();
             }
             SDL_GL_GetDrawableSize(state->windows[i], &w, &h);
             ctx.glViewport(0, 0, w, h);