From 7b3ac18c2e4226726bfa12c87f6a60a7b04b3744 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Gallet?= Date: Sat, 6 Jul 2024 12:53:57 +0200 Subject: [PATCH] Define SDL_RenderGeometryRaw instead of SDL_RenderGeometry --- src/external/imgui/imgui_impl_sdlrenderer2.cpp | 6 ++++-- src/library/sdl/sdldynapi.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/external/imgui/imgui_impl_sdlrenderer2.cpp b/src/external/imgui/imgui_impl_sdlrenderer2.cpp index cbd06f0c..57f60a7b 100644 --- a/src/external/imgui/imgui_impl_sdlrenderer2.cpp +++ b/src/external/imgui/imgui_impl_sdlrenderer2.cpp @@ -52,8 +52,10 @@ extern int SDL_SetTextureScaleMode(SDL_Texture * texture, SDL_ScaleMode scaleMod #endif #if !SDL_VERSION_ATLEAST(2,0,17) -struct SDL_Vertex; -extern int SDL_RenderGeometry(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Vertex *vertices, int num_vertices, const int *indices, int num_indices); +extern int 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); #endif #include "hook.h" diff --git a/src/library/sdl/sdldynapi.cpp b/src/library/sdl/sdldynapi.cpp index 2d8413ca..1acf5167 100644 --- a/src/library/sdl/sdldynapi.cpp +++ b/src/library/sdl/sdldynapi.cpp @@ -38,8 +38,10 @@ OVERRIDE int SDL_SetTextureScaleMode(SDL_Texture * texture, SDL_ScaleMode scaleM #endif #if !SDL_VERSION_ATLEAST(2,0,17) -struct SDL_Vertex; -OVERRIDE int SDL_RenderGeometry(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Vertex *vertices, int num_vertices, const int *indices, int num_indices); +OVERRIDE int 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); #endif #include "logging.h"