Преглед на файлове

Merge pull request #5118 from slendidev/sdl3fixes

Fix SDL3 build if using package
pull/5119/head
Ray преди 1 месец
committed by GitHub
родител
ревизия
284d9ddd89
No known key found for this signature in database GPG ключ ID: B5690EEEBB952194
променени са 1 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. +4
    -2
      src/platforms/rcore_desktop_sdl.c

+ 4
- 2
src/platforms/rcore_desktop_sdl.c Целия файл

@ -48,7 +48,9 @@
*
**********************************************************************************************/
#ifdef USING_SDL3_PACKAGE
#define USING_SDL3_PROJECT
#endif
#ifndef SDL_ENABLE_OLD_NAMES
#define SDL_ENABLE_OLD_NAMES // Just in case we're on SDL3, we need some in-between compatibily
#endif
@ -1620,7 +1622,7 @@ void PollInputEvents(void)
// Add character (codepoint) to the queue
#if defined(PLATFORM_DESKTOP_SDL3)
unsigned int textLen = strlen(event.text.text);
unsigned int codepoint = (unsigned int)SDL_StepUTF8(&event.text.text, textLen);
unsigned int codepoint = (unsigned int)SDL_StepUTF8(&event.text.text, o">&textLen);
#else
int codepointSize = 0;
int codepoint = GetCodepointNextSDL(event.text.text, &codepointSize);

Зареждане…
Отказ
Запис