Skip to content

ImGui::GetIO().DisplaySize lags behind Window::m_iWidth #25

@DaniilIsupov

Description

@DaniilIsupov

in Window::Render function is updating m_iWidth and m_iHeight, but ImGui won't know about it

this leads to the following differences:

    const ImVec2 vecDisplaySize = ImGui::GetIO().DisplaySize;
    std::cout << (std::format(X("DisplaySize: {}, {}"), vecDisplaySize.x, vecDisplaySize.y)) << std::endl;
    std::cout << (std::format(X("Window: {}, {}"), Window::m_iWidth, Window::m_iHeight)) << std::endl;
    // DisplaySize: 1920, 1080
    // Window: 1600, 900

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions