Skip to content

Commit df3a743

Browse files
wermiplsocornut
authored andcommitted
Backends: SDL3: Update for API changes: SDL_GetProperty() change to SDL_GetPointerProperty(). (ocornut#7794)
1 parent 126569a commit df3a743

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

backends/imgui_impl_sdl3.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -387,9 +387,9 @@ static void ImGui_ImplSDL3_SetupPlatformHandles(ImGuiViewport* viewport, SDL_Win
387387
viewport->PlatformHandle = window;
388388
viewport->PlatformHandleRaw = nullptr;
389389
#if defined(__WIN32__) && !defined(__WINRT__)
390-
viewport->PlatformHandleRaw = (HWND)SDL_GetProperty(SDL_GetWindowProperties(window), "SDL.window.win32.hwnd", nullptr);
390+
viewport->PlatformHandleRaw = (HWND)SDL_GetPointerProperty(SDL_GetWindowProperties(window), SDL_PROP_WINDOW_WIN32_HWND_POINTER, nullptr);
391391
#elif defined(__APPLE__) && defined(SDL_VIDEO_DRIVER_COCOA)
392-
viewport->PlatformHandleRaw = (void*)SDL_GetProperty(SDL_GetWindowProperties(window), "SDL.window.cocoa.window", nullptr);
392+
viewport->PlatformHandleRaw = SDL_GetPointerProperty(SDL_GetWindowProperties(window), SDL_PROP_WINDOW_COCOA_WINDOW_POINTER, nullptr);
393393
#endif
394394
}
395395

docs/CHANGELOG.txt

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ Other changes:
6565
- Backends: Win32: Fixed ImGuiMod_Super being mapped to VK_APPS instead of VK_LWIN||VK_RWIN.
6666
(#7768, #4858, #2622) [@Aemony]
6767
- Backends: SDL3: Update for API changes: SDLK_x renames and SDLK_KP_x removals (#7761, #7762)
68+
- Backends: SDL3: Update for API changes: SDL_GetProperty() change to SDL_GetPointerProperty(). (#7794) [@wermipls]
6869
- Backends: SDL2,SDL3,OSX: Update for io.SetPlatformImeDataFn() -> io.PlatformSetImeDataFn() rename.
6970
- Backends: GLFW,SDL2: Added io.PlatformOpenInShellFn handler for web/Emscripten versions. (#7660)
7071
[@ypujante, @ocornut]

0 commit comments

Comments
 (0)