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

process multiple SDL events per tick #24

Closed
wants to merge 1 commit into from
Closed

Conversation

rlane
Copy link

@rlane rlane commented Mar 8, 2012

This greatly reduces input lag.

Fixes #17.

This dramatically reduces the input lag reported in issue antirez#17.
@antirez
Copy link
Owner

antirez commented Mar 8, 2012

Hello Rich,

with the current implementation of events this patch breaks the functionality, for instance consider the following program:

function draw()
    if mouse.pressed['1'] then
        ellipse(mouse.x,mouse.y,30,30)
    end
end

If you have a touchpad and just touch it to simulate a very fast click, many times it will be missed, because this will generate other events with random ordering. In order to fix this we need a more complex solution where if something was touched in the context of the while() loop, the 'pressed' filed is set, but we remember to clear it later if we also captured the BUTTONUP event.

@antirez
Copy link
Owner

antirez commented Mar 8, 2012

I just pushed a commit that should fix the issue properly. Thanks.

@antirez antirez closed this Mar 8, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Performance on Open Pandora is 'laggy'
2 participants