SDL: make video/pandora to actually compile somehow.

From 48b62e2e57e3eea2b84ed3147f5ea9223a8f63bd Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Tue, 23 Jan 2024 17:50:10 +0300
Subject: [PATCH] make video/pandora to actually compile somehow.

no one ever maintained it for years..
---
 src/video/pandora/SDL_pandora.c | 40 +++++++++++----------------------
 1 file changed, 13 insertions(+), 27 deletions(-)

diff --git a/src/video/pandora/SDL_pandora.c b/src/video/pandora/SDL_pandora.c
index e0aec8755543..35e062347f36 100644
--- a/src/video/pandora/SDL_pandora.c
+++ b/src/video/pandora/SDL_pandora.c
@@ -41,11 +41,6 @@
 static NativeWindowType hNativeWnd = 0; /* A handle to the window we will create. */
 #endif
 
-static int PND_available(void)
-{
-    return 1;
-}
-
 static void PND_destroy(SDL_VideoDevice * device)
 {
     if (device->driverdata) {
@@ -55,18 +50,10 @@ static void PND_destroy(SDL_VideoDevice * device)
     SDL_free(device);
 }
 
-static SDL_VideoDevice *PND_create()
+static SDL_VideoDevice *PND_create(void)
 {
     SDL_VideoDevice *device;
     SDL_VideoData *phdata;
-    int status;
-
-    /* Check if pandora could be initialized */
-    status = PND_available();
-    if (status == 0) {
-        /* PND could not be used */
-        return NULL;
-    }
 
     /* Initialize SDL_VideoDevice structure */
     device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice));
@@ -139,8 +126,8 @@ VideoBootStrap PND_bootstrap = {
     "pandora",
     "SDL Pandora Video Driver",
 #endif
-    PND_available,
-    PND_create
+    PND_create,
+    NULL /* no ShowMessageBox implementation */
 };
 
 /*****************************************************************************/
@@ -586,16 +573,16 @@ SDL_GLContext PND_gl_createcontext(_THIS, SDL_Window * window)
     }
 
 #ifdef WIZ_GLES_LITE
-    if(!hNativeWnd) {
-    hNativeWnd = (NativeWindowType)SDL_malloc(16*1024);
-
-    if(!hNativeWnd)
-        printf( "Error: Wiz framebuffer allocatation failed\n" );
-    else
-        printf( "SDL: Wiz framebuffer allocated: %X\n", hNativeWnd );
+    if (!hNativeWnd) {
+        hNativeWnd = (NativeWindowType)SDL_malloc(16*1024);
+        if (!hNativeWnd) {
+            printf("Error: Wiz framebuffer allocatation failed\n");
+        } else {
+            printf("SDL: Wiz framebuffer allocated: %X\n", hNativeWnd);
+        }
     }
     else {
-        printf( "SDL: Wiz framebuffer already allocated: %X\n", hNativeWnd );
+        printf("SDL: Wiz framebuffer already allocated: %X\n", hNativeWnd);
     }
 
     wdata->gles_surface =
@@ -787,11 +774,10 @@ void PND_gl_deletecontext(_THIS, SDL_GLContext context)
     }
 
 #ifdef WIZ_GLES_LITE
-    if( hNativeWnd != 0 )
-    {
+    if (hNativeWnd != 0) {
       SDL_free(hNativeWnd);
       hNativeWnd = 0;
-      printf( "SDL: Wiz framebuffer released\n" );
+      printf("SDL: Wiz framebuffer released\n");
     }
 #endif