Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fixing repeated uses of CCore::CreateXML #4033

Merged
merged 2 commits into from
Feb 18, 2025
Merged

Conversation

G-Moris
Copy link
Contributor

@G-Moris G-Moris commented Feb 18, 2025

No description provided.

Copy link
Member

@botder botder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This module gets created/loaded in CCore constructor

@botder botder merged commit 8fa45f1 into multitheftauto:master Feb 18, 2025
6 checks passed
@botder botder added this to the 1.6.1 milestone Feb 18, 2025
botder added a commit that referenced this pull request Feb 19, 2025
@botder
Copy link
Member

botder commented Feb 19, 2025

This had to be reverted because key bindings were not loading properly and were missing.

@Lpsd
Copy link
Member

Lpsd commented Feb 19, 2025

https://github.com/multitheftauto/mtasa-blue/blob/master/Client/core/CCore.cpp#L95

Move this line below the m_pKeyBinds instantiation if you want to remove the other CreateXML calls.

Alternatively, and probably a better solution to fix this spaghetti code, is to move the following logic to its own function and call it after the m_pKeyBinds instantiation, leaving the CreateXML call where it is. Maybe that logic can even go in the CKeyBinds constructor....

https://github.com/multitheftauto/mtasa-blue/blob/master/Client/core/CCore.cpp#L1079-L1084

Please test your work before submitting it.

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

Successfully merging this pull request may close these issues.

3 participants