Quellcode durchsuchen

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

functions in the case of SDL backend.
pull/5005/head
NimComPoo-04 vor 2 Wochen
Ursprung
Commit
01daa6de34
1 geänderte Dateien mit 8 neuen und 0 gelöschten Zeilen
  1. +8
    -0
      src/rtext.c

+ 8
- 0
src/rtext.c Datei anzeigen

@ -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
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------

Laden…
Abbrechen
Speichern