Closed remko closed 2 years ago
Hi @remko, that should be because the loop doesn't have a delay so it would render as many times as it can. You could put a sdl.Delay(16)
inside the for running {}
loop to have it refresh at roughly 60 frames per second.
Hi @veeableful Thanks! I was actually confusing the behavior of SDL_PollEvent with SDL_WaitEvent.
When compiling the example from the README on macOS (10.15.7, SDL2 2.0.16 from homebrew), the application goes to 100%. Printing the events that come from SDL_PollEvent, it doesn't seem that there are many events coming in (just what you would expect). Any clue what could be wrong, or how to figure out what's going wrong?