Simulator drops a lot of frames when using a high poll rate mouse on windows. My mouse is only 1000Hz but still we get the slowdown, see this video (only happens when you mouse over the simulator):
I know this is an issue with SDL2. Here's some relevant links:
I used a similar approach to this in order to fix the problem for a personal project and it seemed to work - but not sure if applicable in PD Simulator case.
This isn't a big problem as we don't use mouse often when the simulator is open, I only just realized the reason today - I thought there was something slow in my code
Hahah thank you. Worth noting that my framerate is fully uncapped (setRefreshRate(0)) and I'm manually updating the frame buffer / marking updated rows so the refresh rate is absurdly high for this trivial example (~750fps). Not sure if this is still an issue at 50hz - I'll confirm tonight.
Thanks so much, I was able to reproduce the issue. It wasn't SDL related but rather Windows being Windows. It was updating the mouse position so much it was starving the UI of drawing events even though the UI was being told to redraw. I'm now being a bit more aggressive with redrawing the screen which fixes the issue.