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 / VideoCommon: update imgui to 1.89.7 (and implot to 0.15) #12065
Conversation
@Pokechu22 - sorry for the ping but would you feel comfortable reviewing this? It looks like you've worked on imgui in the past. |
038a562
to
63c7afb
Compare
@Pokechu22 - looks like we can use the option Comment:
Going to put back in the compilation and use that flag. |
…with upgrade; keep the demo code in case someone wants to reference it but don't compile it by enabling 'IMGUI_DISABLE_DEMO_WINDOWS' in config
…td::string in InputText
@Pokechu22 - Appreciate you looking this over. I added the C++ interface that imgui ships which supports |
ImGuiKey_A, ImGuiKey_C, ImGuiKey_V, ImGuiKey_X, | ||
ImGuiKey_Y, ImGuiKey_Z, | ||
}; | ||
static_assert(dolphin_to_imgui_map.size() == ImGuiKey_COUNT); // Fail if ImGui adds keys |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this static assert no longer correct? DolphinKey
is a Common::EnumMap
which doesn't do bounds-checking (but it looks like the more relevant thing is that DolphinKey::Z
is the last key in the map, and that's less likely to change).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's no longer correct. While the key still exists, the number of entries is much much larger (compare with original). There was a big change to 1.87 inputs in imgui from what I understand.
My assumption was that this would be ok because both key_map
and dolphin_to_imgui_map
are the same types and are both bound by DolphinKey::Z
as you mention. If DolphinKeyMap
changed both of these maps would need to change as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't looked over the changes to imgui itself, but this looks reasonable to me.
Looks like this impacted netplay. I will look into reproducing and fix it (from the error guessing it is an unlabeled element). |
This updates imgui to its latest release 1.89.7 and due to breaking changes updates implot to 0.15.
Updating broke our handoff of the IO from QT to ImGui. This review also fixes that and moves us to use
AddKeyEvent
which is the new recommended way of handling key events.Finally, I included
imgui_demo.cpp
as it is pretty handy to be able to see all the demo controls working when doing development. It is left out of compilation withIMGUI_DISABLE_DEMO_WINDOWS
but can be enabled if someone wants to reference it.