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

Remove two redundant lines of code setting io.DisplaySize in ImGuiLayer.cpp #660

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

littlecaca
Copy link

Application& app = Application::Get();
io.DisplaySize = ImVec2((float)app.GetWindow().GetWidth(), (float)app.GetWindow().GetHeight());

This is redundant because the "ImGui_ImplGlfw_NewFrame();" has done this work. That is in
ImGui_ImplOpenGL3_NewFrame();
ImGui_ImplGlfw_NewFrame();
ImGui::NewFrame();

And the definition of ImGui_ImplGlfw_NewFrame() is in:https://github.com/TheCherno/imgui/blob/3cf61f67de73153e29e0c26f23d80edbaf120a3d/examples/imgui_impl_glfw.cpp#L473-L477

So, I removed them. Not confirmed its working state.

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

Successfully merging this pull request may close these issues.

1 participant