SDL: Fixed building with C89 compiler

From c87b0142fe1e14c2e69bd62e852f919e67423fe9 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Mon, 30 May 2022 12:02:08 -0700
Subject: [PATCH] Fixed building with C89 compiler

---
 src/video/android/SDL_androidwindow.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/video/android/SDL_androidwindow.c b/src/video/android/SDL_androidwindow.c
index 0b6291036db..21bedca7d80 100644
--- a/src/video/android/SDL_androidwindow.c
+++ b/src/video/android/SDL_androidwindow.c
@@ -116,6 +116,8 @@ Android_SetWindowFullscreen(_THIS, SDL_Window *window, SDL_VideoDisplay *display
     SDL_LockMutex(Android_ActivityMutex);
 
     if (window == Android_Window) {
+        SDL_WindowData *data;
+        int old_w, old_h, new_w, new_h;
 
         /* If the window is being destroyed don't change visible state */
         if (!window->is_destroying) {
@@ -132,8 +134,7 @@ Android_SetWindowFullscreen(_THIS, SDL_Window *window, SDL_VideoDisplay *display
             goto endfunction;
         }
 
-        SDL_WindowData *data = (SDL_WindowData *)window->driverdata;
-
+        data = (SDL_WindowData *)window->driverdata;
         if (!data || !data->native_window) {
             if (data && !data->native_window) {
                 SDL_SetError("Missing native window");
@@ -141,11 +142,11 @@ Android_SetWindowFullscreen(_THIS, SDL_Window *window, SDL_VideoDisplay *display
             goto endfunction;
         }
 
-        int old_w = window->w;
-        int old_h = window->h;
+        old_w = window->w;
+        old_h = window->h;
 
-        int new_w = ANativeWindow_getWidth(data->native_window);
-        int new_h = ANativeWindow_getHeight(data->native_window);
+        new_w = ANativeWindow_getWidth(data->native_window);
+        new_h = ANativeWindow_getHeight(data->native_window);
 
         if (new_w < 0 || new_h < 0) {
             SDL_SetError("ANativeWindow_getWidth/Height() fails");