Adding a check in rtext module to enable the GetCodepoint, GetCodepointNext, GetCodepointPrevious

functions in the case of SDL backend.
This commit is contained in:
NimComPoo-04 2025-06-24 17:06:09 +05:30
parent b677376088
commit 01daa6de34

View File

@ -1988,6 +1988,10 @@ const char *CodepointToUTF8(int codepoint, int *utf8Size)
return utf8; return utf8;
} }
#endif // SUPPORT_TEXT_MANIPULATION #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 // 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 // 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; return codepoint;
} }
#endif
#if defined(SUPPORT_MODULE_RTEXT)
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Module specific Functions Definition // Module specific Functions Definition
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------