From 8d249d5b48d952c650d8ed31ed0ea5469f85dbf3 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Thu, 27 May 2021 17:03:40 +0300
Subject: [PATCH] avoid -Wdeclaration-after-statement
---
src/SDL12_compat.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/SDL12_compat.c b/src/SDL12_compat.c
index 6c66874..1db8cef 100644
--- a/src/SDL12_compat.c
+++ b/src/SDL12_compat.c
@@ -3846,11 +3846,12 @@ static void
PresentScreen(void)
{
void *pixels = NULL;
+ SDL_Palette *logicalPal;
int pitch = 0;
SDL_assert(VideoSurface12 != NULL);
- SDL_Palette *logicalPal = VideoSurface12->surface20->format->palette;
+ logicalPal = VideoSurface12->surface20->format->palette;
VideoSurface12->surface20->format->palette = VideoPhysicalPalette20;
if (SDL20_LockTexture(VideoTexture20, NULL, &pixels, &pitch) < 0) {