-
Notifications
You must be signed in to change notification settings - Fork 172
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
Fix for imgui 1.91.5 (clean some deprecated API calls) #305
base: 2.6.x
Are you sure you want to change the base?
Conversation
Oh, it seems that the changes are still compatible with 1.89. |
What do we gain by upgrading the minimum ImGui version for ImGui-SFML 2 besides the ability to remove more deprecated functions? |
Upgrading the minimum version with the associated fixes could allow users to build with the more strict compilation flag, but I realize that maybe we are not many to do that and it's not worth it. Concerning this PR, it appears that the changes are still compatible with 1.89, and would allow building with the deprecation flag from 1.89 to 1.91.0. For more details about API deprecation, I just realized that an exhaustive list exists at the beginning of imgui.cpp (look for "API BREAKING CHANGES" near line 430). |
If we can remove the use of interfaces that exist in 1.89 but were deprecated later, I'm cool with that. |
After doing some migration on my own projects, it appears that the latest imgui version (1.91.5) actually removed some of the interfaces I cleaned in this PR, so it will be required anyway. |
@@ -586,36 +586,9 @@ void SetJoystickRTriggerThreshold(float threshold) { | |||
|
|||
void SetJoystickMapping(int key, unsigned int joystickButton) { | |||
assert(s_currWindowCtx); | |||
// This function now expects ImGuiKey_* values. | |||
// For partial backwards compatibility, also expect some ImGuiNavInput_* values. |
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.
Did ImGuiNavInput_
enumerators get removed?
assert(key >= ImGuiKey_NamedKey_BEGIN && key < ImGuiKey_NamedKey_END); | ||
finalKey = static_cast<ImGuiKey>(key); | ||
} | ||
assert(key >= ImGuiKey_NamedKey_BEGIN && key < ImGuiKey_NamedKey_END); |
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.
Can you please break this up into two separate assert
s?
This PR contains fixes for imgui 1.90 when using the IMGUI_DISABLE_OBSOLETE_FUNCTIONS flag.
Associated discussions : #301
For this PR to be finalized, the minimum supported version will have to be updated from 1.89 to 1.90.
The supported versions with the flag enabled would range from 1.90 (November 2023) to 1.91.0 (July 2024)
EDIT: It appears that the minimum version supported is unchanged, no need to update it.
To make the change on the CI settings and docs, I guess I should wait for the imgui_version branch to be merged back into the 2.6.x branch ?
PS: if several tests are implemented for different imgui targets, it could be interesting to also target the -docking tags associated with each imgui version.
(EDIT: not sure if anything could break on those branches though).