From 50935a9d41728f61af25ce37b035a873514b1b46 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Tue, 8 Apr 2025 14:56:50 +0300
Subject: [PATCH] fix sdlgenblit.pl so that it actually matches the generated
source
(cherry picked from commit b0a0d236d85088a5c7cf80f25c60f3dcabe290d0)
---
src/video/SDL_blit_auto.h | 3 ++-
src/video/sdlgenblit.pl | 12 ++++++++++--
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/src/video/SDL_blit_auto.h b/src/video/SDL_blit_auto.h
index cd3f0d8856017..329ffe5c8ff62 100644
--- a/src/video/SDL_blit_auto.h
+++ b/src/video/SDL_blit_auto.h
@@ -20,12 +20,13 @@
3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_internal.h"
-#include "SDL_blit.h"
#ifdef SDL_HAVE_BLIT_AUTO
/* *INDENT-OFF* */ // clang-format off
+#include "SDL_blit.h"
+
extern SDL_BlitFuncEntry SDL_GeneratedBlitFuncTable[];
/* *INDENT-ON* */ // clang-format on
diff --git a/src/video/sdlgenblit.pl b/src/video/sdlgenblit.pl
index 47c90d5e65965..19111227b558f 100755
--- a/src/video/sdlgenblit.pl
+++ b/src/video/sdlgenblit.pl
@@ -112,7 +112,6 @@ sub open_file {
3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_internal.h"
-#include "SDL_surface_c.h"
#ifdef SDL_HAVE_BLIT_AUTO
@@ -641,6 +640,14 @@ sub output_copyinc
__EOF__
}
+sub output_copyinc_h
+{
+ print FILE <<__EOF__;
+#include "SDL_blit.h"
+
+__EOF__
+}
+
sub output_copyfunctable
{
print FILE <<__EOF__;
@@ -693,7 +700,7 @@ sub output_copyfunctable
}
}
print FILE <<__EOF__;
- { 0, 0, 0, 0, NULL }
+ { SDL_PIXELFORMAT_UNKNOWN, SDL_PIXELFORMAT_UNKNOWN, 0, 0, NULL }
};
__EOF__
@@ -716,6 +723,7 @@ sub output_copyfunc_c
}
open_file("SDL_blit_auto.h");
+output_copyinc_h();
output_copydefs();
for (my $i = 0; $i <= $#src_formats; ++$i) {
for (my $j = 0; $j <= $#dst_formats; ++$j) {