Преглед изворни кода

Fix SDL3 build if using package

pull/5118/head
λxy.x пре 1 месец
committed by Slendi
родитељ
комит
16bd18070f
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 #ifndef SDL_ENABLE_OLD_NAMES
#define SDL_ENABLE_OLD_NAMES // Just in case we're on SDL3, we need some in-between compatibily #define SDL_ENABLE_OLD_NAMES // Just in case we're on SDL3, we need some in-between compatibily
#endif #endif
@ -1620,7 +1622,7 @@ void PollInputEvents(void)
// Add character (codepoint) to the queue // Add character (codepoint) to the queue
#if defined(PLATFORM_DESKTOP_SDL3) #if defined(PLATFORM_DESKTOP_SDL3)
unsigned int textLen = strlen(event.text.text); 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 #else
int codepointSize = 0; int codepointSize = 0;
int codepoint = GetCodepointNextSDL(event.text.text, &codepointSize); int codepoint = GetCodepointNextSDL(event.text.text, &codepointSize);

Loading…
Откажи
Сачувај