mirror of
https://github.com/ocornut/imgui.git
synced 2026-02-01 03:30:06 +00:00
This commit is contained in:
parent
2cbc0f1287
commit
3e8eebfbec
3 changed files with 19 additions and 2 deletions
|
|
@ -564,7 +564,13 @@ static void ImGui_ImplDX11_CreateWindow(ImGuiViewport* viewport)
|
|||
ImGuiViewportDataDx11* data = IM_NEW(ImGuiViewportDataDx11)();
|
||||
viewport->RendererUserData = data;
|
||||
|
||||
HWND hwnd = (HWND)viewport->PlatformHandle;
|
||||
// When using SDL, PlatformHandleRaw will be the HWND (because PlatformHandle would be the SDL_Window)
|
||||
// If not using SDL, PlatformHandleRaw will be null and PlatformHandle will contain the HWND
|
||||
HWND hwnd = (HWND)viewport->PlatformHandleRaw;
|
||||
if (hwnd == 0)
|
||||
{
|
||||
hwnd = (HWND)viewport->PlatformHandle;
|
||||
}
|
||||
IM_ASSERT(hwnd != 0);
|
||||
|
||||
// Create swap chain
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue