Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Externals: Update imgui to 1.85 #10188

Merged
merged 1 commit into from Oct 27, 2021
Merged

Conversation

Pokechu22
Copy link
Contributor

This PR updates Dear ImGui to v1.85 (from 1.70). There shouldn't be any behavior differences, but this update is useful for some other stuff I'm working on (in particular, it adds BeginDisabled and EndDisabled, and also causes a scroll bar to show up if a window is too big and ImGuiWindowFlags_AlwaysAutoResize is in use (before, the window would just not render properly)).

Copy link
Contributor Author

@Pokechu22 Pokechu22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explanation for changes to Dolphin code:

if (m_scroll_to_bottom)
{
ImGui::SetScrollHere(1.0f);
ImGui::SetScrollHereY(1.0f);
m_scroll_to_bottom = false;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -978,6 +978,7 @@ bool Renderer::InitializeImGui()
ImGui::GetIO().DisplayFramebufferScale.y = m_backbuffer_scale;
ImGui::GetIO().FontGlobalScale = m_backbuffer_scale;
ImGui::GetStyle().ScaleAllSizes(m_backbuffer_scale);
ImGui::GetStyle().WindowRounding = 7.0f;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default value was changed to 0.0f in v1.80; 7.0f was the previous default. See ocornut/imgui@b015ea9.

const float center_x = ImGui::GetIO().DisplaySize.x * 0.5f;
const float center_y = ImGui::GetIO().DisplaySize.y * 0.5f;
const float scale = ImGui::GetIO().DisplayFramebufferScale.x;

ImGui::SetNextWindowSize(ImVec2(400.0f * scale, 50.0f * scale), ImGuiCond_Always);
ImGui::SetNextWindowPosCenter(ImGuiCond_Always);
ImGui::SetNextWindowPos(ImVec2(center_x, center_y), ImGuiCond_Always, ImVec2(0.5f, 0.5f));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SetWindowPosCenter was marked as obsolete in v1.52 and removed in v1.74.

@lioncash lioncash merged commit 7558da2 into dolphin-emu:master Oct 27, 2021
10 checks passed
@BParks21
Copy link

This is causing an error window when going in and out of fullscreen.
Screenshot (19)
.

@JosJuice
Copy link
Member

@BParks21
Copy link

Yeah I'm mean just using build 5.0-15419 right before this was merged the issue is not present.

@Pokechu22
Copy link
Contributor Author

That issue has been fixed in 5.0-15427 since a clean build was performed for that. Technically, this PR didn't cause the issue (everything would work properly if you built it locally), but instead the build system not rebuilding files that depended on imgui caused it. That's still something that should be fixed, but it's not clear exactly why the build system isn't rebuilding it.

@BParks21
Copy link

I see. Ok then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants