From 01daa6de3425e8e845d34392b806160bfb8acd9b Mon Sep 17 00:00:00 2001 From: NimComPoo-04 Date: Tue, 24 Jun 2025 17:06:09 +0530 Subject: [PATCH] Adding a check in rtext module to enable the GetCodepoint, GetCodepointNext, GetCodepointPrevious functions in the case of SDL backend. --- src/rtext.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/rtext.c b/src/rtext.c index d7818d2db..2a63184c6 100644 --- a/src/rtext.c +++ b/src/rtext.c @@ -1988,6 +1988,10 @@ const char *CodepointToUTF8(int codepoint, int *utf8Size) return utf8; } #endif // SUPPORT_TEXT_MANIPULATION +#endif + +// The function GetCodepointNext is utilized in rcore_desktop_sdl.c:1610 for textinput +#if defined(SUPPORT_MODULE_RTEXT) || defined(PLATFORM_DESKTOP_SDL) // Get next codepoint in a UTF-8 encoded text, scanning until '\0' is found // When an invalid UTF-8 byte is encountered we exit as soon as possible and a '?'(0x3f) codepoint is returned @@ -2155,6 +2159,10 @@ int GetCodepointPrevious(const char *text, int *codepointSize) return codepoint; } +#endif + +#if defined(SUPPORT_MODULE_RTEXT) + //---------------------------------------------------------------------------------- // Module specific Functions Definition //----------------------------------------------------------------------------------