Skip to content

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

Open
littlecaca wants to merge 1 commit intoTheCherno:masterfrom
littlecaca:fix
Open

Remove two redundant lines of code setting io.DisplaySize in ImGuiLayer.cpp#660
littlecaca wants to merge 1 commit intoTheCherno:masterfrom
littlecaca:fix

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