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

Handle the SDL events strictly in turn #8912

Merged
merged 7 commits into from
Jul 14, 2024

Conversation

oleg-derevenetz
Copy link
Collaborator

fix #8910

@oleg-derevenetz oleg-derevenetz marked this pull request as draft July 3, 2024 20:24
@oleg-derevenetz oleg-derevenetz added bug Something doesn't work ui UI/GUI related stuff labels Jul 3, 2024
@oleg-derevenetz oleg-derevenetz added this to the 1.1.1 milestone Jul 3, 2024
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Clang-Tidy found issue(s) with the introduced code (1/1)

src/engine/localevent.cpp Show resolved Hide resolved
@oleg-derevenetz oleg-derevenetz added SDL2 SDL 2.0 related code and removed ui UI/GUI related stuff labels Jul 3, 2024
@denierlexiese
Copy link

@oleg-derevenetz . I've tried it out. First impressions, keyboard now works well. Strangely mouse has double click now. I tried multiple mice, and they all do the same thing. I tried a separate double detection click app, and it suggests the mouse doesn't double click.

@oleg-derevenetz
Copy link
Collaborator Author

Hi @denierlexiese

Strangely mouse has double click now. I tried multiple mice, and they all do the same thing.

That's because SDL emulates fake touch events from the mouse events, and vice versa. The latter has already been disabled, while the former has not, so each mouse press or release event generated the corresponding fake touch event. Now this behavior is disabled too, so there should be no more "double clicks", please try the latest Android artifact from this PR.

@oleg-derevenetz
Copy link
Collaborator Author

Hi @denierlexiese do you still have any input issues (with keyboard, mouse or touch) with the Android binary from this PR after the latest changes (disabled generation of fake touch events from mouse events)?

@denierlexiese
Copy link

@oleg-derevenetz - yes it works well now.Thank you!. It works well even in usb-c mode with both touch, mouse, and keyboard.

@oleg-derevenetz oleg-derevenetz marked this pull request as ready for review July 6, 2024 08:31
@oleg-derevenetz
Copy link
Collaborator Author

Hi @ihhub probably this PR should be postponed after the upcoming release - depending on your release schedule.

@ihhub
Copy link
Owner

ihhub commented Jul 7, 2024

Hi @oleg-derevenetz , the release is scheduled in 3 days so it would be safer to merge this PR after the release.

@ihhub ihhub modified the milestones: 1.1.1, 1.1.2 Jul 7, 2024
@ihhub
Copy link
Owner

ihhub commented Jul 8, 2024

Hi @oleg-derevenetz , the only worry of mine is that could cause delays of event processing on low end devices when software cursor mode is active. I will try to do some tests on my machine to see how it works.

@denierlexiese
Copy link

@oleg-derevenetz , quick note, when I hook my surface duo up to a 4k monitor the fps drops to 30. The mouse and keyboard are really slow, like lags behind 3 to 4 frames. Not sure what's the cause. The surface duo is annoying because it seems like it isn't able to downscale to 1080p only does the resolution of the output monitor. On my 1080p monitors the game runs fine. On my 4k, even with a resolution in the game of 800x600 it runs really slow on a 4k monitor. Could be a surface duo thing. Just noting odd behavior.

@oleg-derevenetz
Copy link
Collaborator Author

Hi @denierlexiese please note that the build from this PR is a debug build with all compiler optimizations turned off. It is not indicative in terms of the game performance, including the performance of the rendering, which is done in software. Real game performance needs to be evaluated on release builds.

@oleg-derevenetz
Copy link
Collaborator Author

@denierlexiese

when I hook my surface duo up to a 4k monitor the fps drops to 30. The mouse and keyboard are really slow, like lags behind 3 to 4 frames.

BTW, is this observed on the Google Play build as well (except the keyboard of course)?

@denierlexiese
Copy link

Yes, I believe you are correct, that on the Google play build it will get slow on my surface duo as well at large resolutions for mouse lag. On my galaxy phone it doesn't, but I believe my galaxy phone forces 1080p no matter what TV it's running on.

@ihhub ihhub merged commit 50d1181 into ihhub:master Jul 14, 2024
20 checks passed
@ihhub
Copy link
Owner

ihhub commented Jul 14, 2024

@oleg-derevenetz , a bunch of thanks for this fix!

@oleg-derevenetz oleg-derevenetz deleted the surface-duo-keyboard-fix branch July 14, 2024 07:48
@shprotru shprotru mentioned this pull request Jul 28, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something doesn't work SDL2 SDL 2.0 related code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Surface Duo - keyboard input is laggy
3 participants