Skip to content

Commit

Permalink
SDL_bool was removed in SDL3
Browse files Browse the repository at this point in the history
  • Loading branch information
texus committed Sep 21, 2024
1 parent e15fad7 commit 6679cc2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Backend/Font/SDL_ttf/BackendFontSDLttf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ namespace tgui
if (!handle)
return nullptr;

auto font = TTF_OpenFontIO(handle, SDL_TRUE, static_cast<int>(scaledTextSize));
auto font = TTF_OpenFontIO(handle, true, static_cast<int>(scaledTextSize));
#else
SDL_RWops* handle = SDL_RWFromConstMem(m_fileContents.get(), static_cast<int>(m_fileSize));
if (!handle)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ namespace tgui

// Store the current clipping settings, in case we need to change it
SDL_Rect oldClipRect;
const SDL_bool oldClipEnabled = SDL_RenderClipEnabled(m_renderer);
const bool oldClipEnabled = SDL_RenderClipEnabled(m_renderer);
if (oldClipEnabled)
SDL_GetRenderClipRect(m_renderer, &oldClipRect);

Expand Down
6 changes: 3 additions & 3 deletions tests/BackendEvents.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,7 @@ TEST_CASE("[Backend events]")
eventSDL.key.windowID = 0;
eventSDL.key.repeat = 0;
#if SDL_MAJOR_VERSION >= 3
eventSDL.key.down = SDL_TRUE;
eventSDL.key.down = true;
eventSDL.key.scancode = SDL_SCANCODE_UNKNOWN;
eventSDL.key.key = SDLK_UNKNOWN;
eventSDL.key.mod = SDL_KMOD_NONE;
Expand Down Expand Up @@ -1122,7 +1122,7 @@ TEST_CASE("[Backend events]")
{
eventSDL.type = SDL_EVENT_KEY_UP;
#if SDL_MAJOR_VERSION >= 3
eventSDL.key.down = SDL_FALSE;
eventSDL.key.down = false;
eventSDL.key.key = SDLK_SPACE;
#else
eventSDL.key.state = SDL_RELEASED;
Expand Down Expand Up @@ -1459,7 +1459,7 @@ TEST_CASE("[Backend events]")
eventSDL.key.windowID = 0;
eventSDL.key.repeat = 0;
#if SDL_MAJOR_VERSION >= 3
eventSDL.key.down = SDL_TRUE;
eventSDL.key.down = true;
eventSDL.key.scancode = SDL_SCANCODE_UNKNOWN;
eventSDL.key.mod = SDL_KMOD_NONE;
eventSDL.key.key = SDLK_LEFT;
Expand Down

0 comments on commit 6679cc2

Please sign in to comment.