Skip to content

Conversation

@glinesbdev
Copy link

Fixing the sample files to work out of the box and reflect closer to the original source material (LazyFoo).


loop do
case event = SDL::Event.wait
case event = SDL::Event.poll
Copy link
Owner

Choose a reason for hiding this comment

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

No, you want to wait for an event, otherwise we keep redrawing the same image in a tight loop. We'd loop on poll if there was some animation running with FPS limitation. No need to burn the CPU.

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.

2 participants