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
[NOSQUASH] TouchScreenGUI refactor #13640
Conversation
I tested this PR on Samsung Galaxy A72 (Android 13). I waited around 10 seconds in a world before sampling its RAM usage. RAM usage in-game without exiting the app
|
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.
The code looks good, the build passes and some tests were already done.
Minor comment, otherwise fine.
2aede4b
to
6b8680f
Compare
I got the following error with your v7a binary on Android 6 even after deleting
|
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.
Code LGTM
I have updated the APK builds (see the main post) with this PR after rebase and current |
What I forgot to mention previously (and also applies to the newer build):
I found that the directory Either way, the buildbot binary and yours both seem to install the same files. I double-checked the textures that failed to load but they show up in the file browser. Also a texture pack that I might have installed previously magically reappears even after deleting Minetest's data directory manually. I cannot figure out what's wrong and since the build from master does work, I'd prefer to not dig into this any deeper. |
Maximum line length is 95 characters. Some members' name are changed. Struct initialisations use brace syntax; eliminating the usage of the memset function. Iterations use for-each-loop instead of while-loop+iterator. char * -> std::string button_info * -> std::shared_ptr<button_info>
New variables are added to replace in-place calculations.
6b8680f
to
fa53d32
Compare
+ Fix TouchScreenGUI compilation on desktop after minetest#13640
+ Fix TouchScreenGUI compilation on desktop after minetest#13640
+ Fix TouchScreenGUI compilation on desktop after minetest#13640
Goal of the PR
This PR refactors TouchScreenGUI code to make it more safe and maintainable.
How does the PR work?
There are two parts of this PR (separated by two commits):
Does it resolve any reported issue?
There are no reported issue on this, but I noticed that some members/properties/variables were not removed correctly after its parent object is destroyed. There are also some repeating parts inside the code, mainly for the virtual joystick.
Does this relate to a goal in the roadmap?
Yes, this PR tries to refactor internal code.
If not a bug fix, why is this PR needed? What usecases does it solve?
From my tests, there are indications of memory leaks when using TouchScreenGUI code.
To do
This PR is Ready for Review.
How to test
To test the change statically,
To test the change practically,
To spesifically test memory leaks indication,
Android: APK builds
Older APK builds