mirror of
https://github.com/ocornut/imgui.git
synced 2025-10-26 12:27:30 +00:00
Viewports: don't call platform_io.Platform_GetWindowWorkAreaInsets() before window creation. (#7823)
Amend a18f020
This commit is contained in:
@@ -15243,7 +15243,7 @@ static void ImGui::UpdateViewportsNewFrame()
|
|||||||
viewport->WorkInsetMin = viewport->BuildWorkInsetMin;
|
viewport->WorkInsetMin = viewport->BuildWorkInsetMin;
|
||||||
viewport->WorkInsetMax = viewport->BuildWorkInsetMax;
|
viewport->WorkInsetMax = viewport->BuildWorkInsetMax;
|
||||||
viewport->BuildWorkInsetMin = viewport->BuildWorkInsetMax = ImVec2(0.0f, 0.0f);
|
viewport->BuildWorkInsetMin = viewport->BuildWorkInsetMax = ImVec2(0.0f, 0.0f);
|
||||||
if (g.PlatformIO.Platform_GetWindowWorkAreaInsets != NULL)
|
if (g.PlatformIO.Platform_GetWindowWorkAreaInsets != NULL && platform_funcs_available)
|
||||||
{
|
{
|
||||||
ImVec4 insets = g.PlatformIO.Platform_GetWindowWorkAreaInsets(viewport);
|
ImVec4 insets = g.PlatformIO.Platform_GetWindowWorkAreaInsets(viewport);
|
||||||
IM_ASSERT(insets.x >= 0.0f && insets.y >= 0.0f && insets.z >= 0.0f && insets.w >= 0.0f);
|
IM_ASSERT(insets.x >= 0.0f && insets.y >= 0.0f && insets.z >= 0.0f && insets.w >= 0.0f);
|
||||||
|
|||||||
Reference in New Issue
Block a user