Skip to content

Commit

Permalink
SDL_GetProperty changed in SDL3
Browse files Browse the repository at this point in the history
  • Loading branch information
texus committed Nov 13, 2023
1 parent b78d68f commit 4049431
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Backend/Window/SDL/BackendSDL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,9 @@ namespace tgui
if (!m_mouseCursors[type]) // Only bypass SDL when system cursors are used
{
#if SDL_MAJOR_VERSION >= 3
Display* displayX11 = reinterpret_cast<Display*>(SDL_GetProperty(SDL_GetWindowProperties(window), "SDL.window.x11.display"));
Window windowX11 = reinterpret_cast<Window>(SDL_GetProperty(SDL_GetWindowProperties(window), "SDL.window.x11.window"));
const SDL_PropertiesID windowProps = SDL_GetWindowProperties(window);
const Window windowX11 = static_cast<Window>(SDL_GetNumberProperty(windowProps, "SDL.window.x11.window", 0));
Display* displayX11 = reinterpret_cast<Display*>(SDL_GetProperty(windowProps, "SDL.window.x11.display", nullptr));
#else
Display* displayX11 = nullptr;
Window windowX11 = 0;
Expand Down

0 comments on commit 4049431

Please sign in to comment.