mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
Viewport: Fixed mouse hover flicker on mouse button release frame after moving a window. (#1542)
Platform: Clarifying some comments in back-ends.
This commit is contained in:
@ -512,7 +512,9 @@ void ImGui_ImplDX11_NewFrame()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------
|
||||
// Platform Interface (Optional, for multi-viewport support)
|
||||
// MULTI-VIEWPORT / PLATFORM INTERFACE SUPPORT
|
||||
// This is an _advanced_ and _optional_ feature, allowing the back-end to create and handle multiple viewports simultaneously.
|
||||
// If you are new to dear imgui or creating a new binding for dear imgui, it is recommended that you completely ignore this section first..
|
||||
//--------------------------------------------------------------------------------------------------------
|
||||
|
||||
struct ImGuiViewportDataDx11
|
||||
@ -589,11 +591,7 @@ static void ImGui_ImplDX11_SetWindowSize(ImGuiViewport* viewport, ImVec2 size)
|
||||
ID3D11Texture2D* pBackBuffer = NULL;
|
||||
data->SwapChain->ResizeBuffers(0, (UINT)size.x, (UINT)size.y, DXGI_FORMAT_UNKNOWN, 0);
|
||||
data->SwapChain->GetBuffer(0, IID_PPV_ARGS(&pBackBuffer));
|
||||
if (pBackBuffer == NULL)
|
||||
{
|
||||
fprintf(stderr, "ImGui_ImplDX11_SetWindowSize() can't created buffers.\n");
|
||||
return;
|
||||
}
|
||||
if (pBackBuffer == NULL) { fprintf(stderr, "ImGui_ImplDX11_SetWindowSize() failed creating buffers.\n"); return; }
|
||||
g_pd3dDevice->CreateRenderTargetView(pBackBuffer, NULL, &data->RTView);
|
||||
pBackBuffer->Release();
|
||||
}
|
||||
|
Reference in New Issue
Block a user