Skip to content
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

Remove excessive touchscreengui.h includes #14466

Merged
merged 4 commits into from Mar 17, 2024

Conversation

grorp
Copy link
Member

@grorp grorp commented Mar 16, 2024

While working on #14456, I noticed that recompiling after changes to touchscreengui.h takes way too long.

To fix that, this PR ...

  1. ... moves some code depending on touchscreengui.h from header files to cpp files.
  2. ... removes the redundant MyEventReceiver::m_touchscreengui member.

To do

This PR is a Ready for Review.

How to test

See that the touch controls still work.

See that I didn't change the code while moving it. See that it compiles.

Oops, I thought I had done this already.
This allows removing the touchscreengui.h include from inputhandler.h
It's also cleaner.
@grorp grorp added Maintenance Tasks to keep the codebase and related parts in order, including architectural improvements Android @ Client / Controls / Input labels Mar 16, 2024
Copy link
Member Author

Choose a reason for hiding this comment

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

I know it looks bad that the whole content of the clientdynamicinfo.cpp is inside #ifndef SERVER, but since clientdynamicinfo.h is also used on the server, I can't just move both files into the client folder.

Copy link
Member

@SmallJoker SmallJoker left a comment

Choose a reason for hiding this comment

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

I see the code was touched from atan2 to std::atan2, but aside from that there does not seem to be any difference. It compiles, so I approve.

@grorp grorp merged commit c8b615a into minetest:master Mar 17, 2024
13 checks passed
@grorp grorp deleted the rm-excess-touchscreengui-includes branch March 17, 2024 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android @ Client / Controls / Input Maintenance Tasks to keep the codebase and related parts in order, including architectural improvements >= Two approvals ✅ ✅
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants