SDL: test: If SDL_CreateRenderer() fails, say why

From 8e7c0b34d7961566929f50fededfbb7ce76fb926 Mon Sep 17 00:00:00 2001
From: Simon McVittie <[EMAIL REDACTED]>
Date: Mon, 8 Jan 2024 18:34:28 +0000
Subject: [PATCH] test: If SDL_CreateRenderer() fails, say why

Helps: https://github.com/libsdl-org/SDL/issues/8799
Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 test/testautomation_render.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/testautomation_render.c b/test/testautomation_render.c
index 9ab7ea460393..67b1f4124cde 100644
--- a/test/testautomation_render.c
+++ b/test/testautomation_render.c
@@ -64,7 +64,7 @@ static void InitCreateRenderer(void *arg)
 
     renderer = SDL_CreateRenderer(window, NULL, renderer_flags);
     SDLTest_AssertPass("SDL_CreateRenderer()");
-    SDLTest_AssertCheck(renderer != NULL, "Check SDL_CreateRenderer result");
+    SDLTest_AssertCheck(renderer != NULL, "Check SDL_CreateRenderer result: %s", renderer != NULL ? "success" : SDL_GetError());
     if (renderer == NULL) {
         SDL_DestroyWindow(window);
         return;