From 92d5c352d555ec578ec4c291cc7016e3c2132b26 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Wed, 19 Oct 2022 19:36:57 -0400
Subject: [PATCH] video: Add debug logging for less-than-8-bit-surface hack.
Reference Issue #260.
---
src/SDL12_compat.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/SDL12_compat.c b/src/SDL12_compat.c
index fb134a10d..5b964dae9 100644
--- a/src/SDL12_compat.c
+++ b/src/SDL12_compat.c
@@ -4988,6 +4988,9 @@ SDL_CreateRGBSurface(Uint32 flags12, int width, int height, int depth, Uint32 Rm
!!! FIXME: surfaces smaller than 8 bits, and this lets at
!!! FIXME: least one game function correctly. */
if (depth < 8) {
+ if (WantDebugLogging) {
+ SDL20_Log("This app is creating an %d-bit SDL_Surface, but we are bumping it to 8-bits. If you see rendering issues, please report them!");
+ }
depth = 8;
}