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

Fix emulate_mouse_from_touch setting affecting editor #97649

Merged

Conversation

ohboh
Copy link
Contributor

@ohboh ohboh commented Sep 30, 2024

Fixes #96784, #84207
Make emulate_mouse_from_touch always true in the editor.

@ohboh ohboh requested a review from a team as a code owner September 30, 2024 16:31
@ohboh ohboh changed the title Fix "emulate_touch_from_mouse" setting affecting editor Fix "emulate_mouse_from_touch" setting affecting editor Sep 30, 2024
@Chaosus Chaosus added this to the 4.4 milestone Sep 30, 2024
@ohboh ohboh changed the title Fix "emulate_mouse_from_touch" setting affecting editor Fix emulate_mouse_from_touch setting affecting editor Sep 30, 2024
Make "emulate mouse from touch" always true in the editor
@ohboh ohboh force-pushed the literally-unusable-on-mobile-without-this branch from 47cb88a to 4ef07cb Compare September 30, 2024 18:23
Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

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

This looks fishy to me, the code on lines 3185 to 3190 does nothing as it's always overridden by line 3193. I think this requires a bit more research into why the code is this way and how to fix it.

Also, thanks for your first contribution and welcome 🎉

@akien-mga akien-mga requested a review from m4gr3d October 1, 2024 13:38
@ohboh
Copy link
Contributor Author

ohboh commented Oct 1, 2024

This looks fishy to me, the code on lines 3185 to 3190 does nothing as it's always overridden by line 3193. I think this requires a bit more research into why the code is this way and how to fix it.

I think 3185 to 3190 is for set_emulate_touch_from_mouse while 3193 is for set_emulate_mouse_from_touch.

Copy link
Contributor

@m4gr3d m4gr3d left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Did you validate that the setting still apply to the running project in the Play window?

@@ -3191,6 +3191,10 @@ Error Main::setup2(bool p_show_boot_logo) {
}

id->set_emulate_mouse_from_touch(bool(GLOBAL_DEF_BASIC("input_devices/pointing/emulate_mouse_from_touch", true)));

if (editor) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this also include the project_manager?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Project manager seems to be unaffected by the setting but i can include it if necessary

@ohboh
Copy link
Contributor Author

ohboh commented Oct 21, 2024

Did you validate that the setting still apply to the running project in the Play window?

Yep, everything works fine for me

@Repiteo Repiteo merged commit 6ec3dc1 into godotengine:master Oct 21, 2024
19 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Oct 21, 2024

Thanks! Congratulations on your first contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disabling "emulate mouse from touch" in android editor makes it unusable upon restart
6 participants