From 8a9167d36074905af08ab80cad37448715e1072a Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Thu, 24 Oct 2024 09:10:07 -0700
Subject: [PATCH] Fixed caption placement with the surface text engine
---
examples/showfont.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/showfont.c b/examples/showfont.c
index a9284579..332bfc06 100644
--- a/examples/showfont.c
+++ b/examples/showfont.c
@@ -101,7 +101,7 @@ static void DrawScene(Scene *scene)
case TextEngineSurface:
/* Flush the renderer so we can draw directly to the window surface */
SDL_FlushRenderer(renderer);
- TTF_DrawSurfaceText(scene->caption, scene->captionRect.w, scene->captionRect.h, scene->window_surface);
+ TTF_DrawSurfaceText(scene->caption, scene->captionRect.x, scene->captionRect.y, scene->window_surface);
break;
case TextEngineRenderer:
TTF_DrawRendererText(scene->caption, (float)scene->captionRect.x, (float)scene->captionRect.y);