sdl12-compat: surface: Set SDL_SRCALPHA on newly-created surfaces the same way as 1.2.

From 85031ff680c1d0be3968f45f58e7733873929e0c Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Mon, 15 May 2023 23:42:06 -0400
Subject: [PATCH] surface: Set SDL_SRCALPHA on newly-created surfaces the same
 way as 1.2.

Reference Issue #244.
---
 src/SDL12_compat.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/SDL12_compat.c b/src/SDL12_compat.c
index f29e98f47..b8bdd2a2c 100644
--- a/src/SDL12_compat.c
+++ b/src/SDL12_compat.c
@@ -5134,7 +5134,7 @@ SDL_CreateRGBSurface(Uint32 flags12, int width, int height, int depth, Uint32 Rm
 
     SetPalette12ForMasks(surface12, Rmask, Gmask, Bmask);
 
-    if (flags12 & SDL12_SRCALPHA) {
+    if (Amask != 0) {
         surface12->flags |= SDL12_SRCALPHA;
         SDL20_SetSurfaceBlendMode(surface20, SDL_BLENDMODE_BLEND);
     }
@@ -6619,7 +6619,7 @@ SDL_ConvertSurface(SDL12_Surface *src12, const SDL12_PixelFormat *format12, Uint
         if (!retval) {
             SDL20_FreeSurface(surface20);
         } else {
-            if (flags12 & SDL12_SRCALPHA) {
+            if (retval->format->Amask != 0) {
                 SDL20_SetSurfaceBlendMode(surface20, SDL_BLENDMODE_BLEND);
                 retval->flags |= SDL12_SRCALPHA;
             }