Browse Source

Backends: SDL3: fixed pulling SDL_PROP_WINDOW_COCOA_WINDOW_POINTER into viewport->PlatformHandleRaw. (#8725, #8726)

SDL_VIDEO_DRIVER_COCOA does not exist on SDL3.
Geert Bleyen 1 tháng trước cách đây
mục cha
commit
04a5b9c2cf
2 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 1 1
      backends/imgui_impl_sdl3.cpp
  2. 2 0
      docs/CHANGELOG.txt

+ 1 - 1
backends/imgui_impl_sdl3.cpp

@@ -458,7 +458,7 @@ static void ImGui_ImplSDL3_SetupPlatformHandles(ImGuiViewport* viewport, SDL_Win
     viewport->PlatformHandleRaw = nullptr;
 #if defined(_WIN32) && !defined(__WINRT__)
     viewport->PlatformHandleRaw = (HWND)SDL_GetPointerProperty(SDL_GetWindowProperties(window), SDL_PROP_WINDOW_WIN32_HWND_POINTER, nullptr);
-#elif defined(__APPLE__) && defined(SDL_VIDEO_DRIVER_COCOA)
+#elif defined(__APPLE__)
     viewport->PlatformHandleRaw = SDL_GetPointerProperty(SDL_GetWindowProperties(window), SDL_PROP_WINDOW_COCOA_WINDOW_POINTER, nullptr);
 #endif
 }

+ 2 - 0
docs/CHANGELOG.txt

@@ -445,6 +445,8 @@ Other changes:
     memory ownership change. (#8530, #7801) [@Green-Sky]
   - Backends: SDL3: honor ImGuiPlatformImeData->WantTextInput as an alternative
     way to call SDL_StartTextInput(), without IME being necessarily visible. (#8584)
+  - Backends: SDL3: fixed pulling SDL_PROP_WINDOW_COCOA_WINDOW_POINTER into
+    viewport->PlatformHandleRaw. (#8725, #8726) [@eertbleyen]
   - Backends: OSX: ImGui_ImplOSX_HandleEvent() only process event for window containing
     our view. (#8644) [@BingoXuan]
 - Examples: