Skip to content

Commit

Permalink
Make ImPlatform compile on the main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
soufianekhiat committed Jun 6, 2024
1 parent 0e98c5d commit 7c8fecf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ImPlatform/ImPlatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,9 @@ namespace ImPlatform

ImGui::SetNextWindowPos( ImVec2( pViewport->Pos.x, pViewport->Pos.y + titlebarVerticalOffset ) );
ImGui::SetNextWindowSize( vDragZoneSize );
#ifdef IMGUI_HAS_VIEWPORT
ImGui::SetNextWindowViewport( pViewport->ID );
#endif

bool bRet = ImGui::Begin( "##ImPlatformCustomTitleBar", 0, ImGuiWindowFlags_NoDecoration );
ImVec2 vPos = ImGui::GetCursorPos();
Expand Down Expand Up @@ -2390,8 +2392,10 @@ static void Im_Hook_Renderer_SwapBuffers( ImGuiViewport* viewport, void* )
{
ImPlatform::ImGfxViewportPre();

#ifdef IMGUI_HAS_VIEWPORT
ImGui::UpdatePlatformWindows();
ImGui::RenderPlatformWindowsDefault();
#endif

ImPlatform::ImGfxViewportPost();
}
Expand Down

0 comments on commit 7c8fecf

Please sign in to comment.