sdl12-compat: SDL_VideoInit() should call Init12Video()

From fc6a03ea75430b3c6fe991eb268edb9cbf1d1744 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Mon, 24 Jan 2022 23:55:31 -0500
Subject: [PATCH] SDL_VideoInit() should call Init12Video()

Reference Issue #143.
---
 src/SDL12_compat.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/SDL12_compat.c b/src/SDL12_compat.c
index 4a2483b..27a3cb9 100644
--- a/src/SDL12_compat.c
+++ b/src/SDL12_compat.c
@@ -1797,9 +1797,18 @@ Init12Video(void)
 DECLSPEC int SDLCALL
 SDL_VideoInit(const char *driver, Uint32 flags)
 {
-    (void) flags;
-    FIXME("Does this need to call Init12Video?");
-    return SDL20_VideoInit(driver);
+    int retval;
+
+    (void) flags;  /* unused. */
+
+    retval = SDL20_VideoInit(driver);
+    if (retval != -1) {
+        retval = Init12Video();
+        if (retval == -1) {
+            SDL20_VideoQuit();
+        }
+    }
+    return retval;
 }