Hello!
While porting for Maemo, I observed that some mouse events were treated twice. In fact, video subparts generate an event and thus call HandleMouseEvents themselves, but HandleMouseEvents is also called in InputLoop, thus leading to mouse events being treated twice in race conditions. This patch will remove the call in InputLoop.
Please comment.
Edit : I didn't saw that there was a bugs manager, I have just posted that patch there: http://bugs.openttd.org/task/1725
Patch: some mouse events are treated twice
Moderator: OpenTTD Developers
Patch: some mouse events are treated twice
- Attachments
-
- twice_treated_mouse_events.patch
- Patch to correct mouse events treated twice
- (255 Bytes) Downloaded 160 times
Re: Patch: some mouse events are treated twice
Here is an updated version of the patch.
As for scrolling, now HandleMouseEvents will not be called in InputLoop unless there were no InputEvents during the tick.
Please comment.
As for scrolling, now HandleMouseEvents will not be called in InputLoop unless there were no InputEvents during the tick.
Please comment.
- Attachments
-
- twice_treated_mouse_events-updated.patch
- (986 Bytes) Downloaded 210 times
Re: Patch: some mouse events are treated twice
I built two binaries on Linux one without your patch and one with patch and ran them in windowed mode side by side so that I could test and see if i could notice any difference. I only did move around a few minutes.
Using my Wacom in absolute addressing mode I did not noticed any difference.
Using my trackball (relative addressed device) I did neither notice any differences between with or without your patch.
Using my Wacom in absolute addressing mode I did not noticed any difference.
Using my trackball (relative addressed device) I did neither notice any differences between with or without your patch.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: Patch: some mouse events are treated twice
In fact, the problem this patch solves is to be noticed only on slow devices, on which this race condition can occur, like the n810.
Who is online
Users browsing this forum: No registered users and 7 guests