Backends: fixed comment to state that ImGuiViewport::PlaformHandle is used to store SDL's WindowID, not SDL_Window*. (#7853)

Amend 2d99052
This commit is contained in:
ocornut
2025-02-25 15:55:54 +01:00
parent dd89bb1469
commit 9ab0b66f50
9 changed files with 19 additions and 19 deletions

View File

@@ -460,7 +460,7 @@ static void ImGui_ImplDX9_CreateWindow(ImGuiViewport* viewport)
ImGui_ImplDX9_ViewportData* vd = IM_NEW(ImGui_ImplDX9_ViewportData)();
viewport->RendererUserData = vd;
// PlatformHandleRaw should always be a HWND, whereas PlatformHandle might be a higher-level handle (e.g. GLFWWindow*, SDL_Window*).
// PlatformHandleRaw should always be a HWND, whereas PlatformHandle might be a higher-level handle (e.g. GLFWWindow*, SDL's WindowID).
// Some backends will leave PlatformHandleRaw == 0, in which case we assume PlatformHandle will contain the HWND.
HWND hwnd = viewport->PlatformHandleRaw ? (HWND)viewport->PlatformHandleRaw : (HWND)viewport->PlatformHandle;
IM_ASSERT(hwnd != 0);