sdl2-compat: Updated after SDL_RenderGeometryRaw() switched back to SDL_Color

From d079b3951e90b1d0ca142093046d4b7983d4d61a Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Tue, 6 Feb 2024 18:24:39 -0800
Subject: [PATCH] Updated after SDL_RenderGeometryRaw() switched back to
 SDL_Color

---
 src/sdl2_compat.c | 28 +---------------------------
 src/sdl3_syms.h   |  2 +-
 2 files changed, 2 insertions(+), 28 deletions(-)

diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index d162496..7375e39 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -4327,33 +4327,7 @@ SDL_RenderGeometry(SDL_Renderer *renderer, SDL_Texture *texture, const SDL2_Vert
 DECLSPEC int SDLCALL
 SDL_RenderGeometryRaw(SDL_Renderer *renderer, SDL_Texture *texture, const float *xy, int xy_stride, const SDL_Color *color, int color_stride, const float *uv, int uv_stride, int num_vertices, const void *indices, int num_indices, int size_indices)
 {
-    int i, retval, isstack;
-    const char *color2 = (const char *) color;
-    SDL_FColor *color3;
-
-    if (num_vertices <= 0) {
-        return SDL3_InvalidParamError("num_vertices");
-    }
-    if (!color) {
-        return SDL3_InvalidParamError("color");
-    }
-
-    color3 = (SDL_FColor *) SDL3_small_alloc(SDL_FColor, num_vertices, &isstack);
-    if (!color3) {
-        return SDL3_OutOfMemory();
-    }
-    for (i = 0; i < num_vertices; ++i) {
-        color3[i].r = color->r / 255.0f;
-        color3[i].g = color->g / 255.0f;
-        color3[i].b = color->b / 255.0f;
-        color3[i].a = color->a / 255.0f;
-        color2 += color_stride;
-        color = (const SDL_Color *) color2;
-    }
-
-    color_stride = sizeof(SDL_FColor);
-    retval = SDL3_RenderGeometryRaw(renderer, texture, xy, xy_stride, color3, color_stride, uv, uv_stride, num_vertices, indices, num_indices, size_indices);
-    SDL3_small_free(color3, isstack);
+    const int retval = SDL3_RenderGeometryRaw(renderer, texture, xy, xy_stride, color, color_stride, uv, uv_stride, num_vertices, indices, num_indices, size_indices);
     return retval < 0 ? retval : FlushRendererIfNotBatching(renderer);
 }
 
diff --git a/src/sdl3_syms.h b/src/sdl3_syms.h
index d5414a4..86792de 100644
--- a/src/sdl3_syms.h
+++ b/src/sdl3_syms.h
@@ -702,7 +702,7 @@ SDL3_SYM_PASSTHROUGH(int,FlashWindow,(SDL_Window *a, SDL_FlashOperation b),(a,b)
 SDL3_SYM_RENAMED(int,GameControllerSendEffect,SendGamepadEffect,(SDL_GameController *a, const void *b, int c),(a,b,c),return)
 SDL3_SYM_RENAMED(int,JoystickSendEffect,SendJoystickEffect,(SDL_Joystick *a, const void *b, int c),(a,b,c),return)
 SDL3_SYM_RENAMED(float,GameControllerGetSensorDataRate,GetGamepadSensorDataRate,(SDL_GameController *a, SDL_SensorType b),(a,b),return)
-SDL3_SYM(int,RenderGeometryRaw,(SDL_Renderer *a, SDL_Texture *b, const float *c, int d, const SDL_FColor *e, int f, const float *g, int h, int i, const void *j, int k, int l),(a,b,c,d,e,f,g,h,i,j,k,l),return)
+SDL3_SYM(int,RenderGeometryRaw,(SDL_Renderer *a, SDL_Texture *b, const float *c, int d, const SDL_Color *e, int f, const float *g, int h, int i, const void *j, int k, int l),(a,b,c,d,e,f,g,h,i,j,k,l),return)
 SDL3_SYM_RENAMED(int,RenderSetVSync,SetRenderVSync,(SDL_Renderer *a, int b),(a,b),return)
 SDL3_SYM_VARARGS(int,asprintf,(char **a, SDL_PRINTF_FORMAT_STRING const char *b, ...))
 SDL3_SYM_PASSTHROUGH(int,vasprintf,(char **a, const char *b, va_list c),(a,b,c),return)