Simulator Responds Poorly to High Poll Rate Mice

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 :joy:

Thanks for the report, my gamer son has a 1000 hz mouse I can borrow to test this with. :slight_smile:

1 Like

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.

I can't reproduce this with a simple test app. Could you post the app you're testing with?

Sure thing, do you just want the compiled binary or do you need me to provide source?

Binary is fine, thanks!

pd1.pdx.zip (17.7 KB)
Here you go! Its Debug x64!

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.

1 Like

Really nice catch! Classic windows :stuck_out_tongue_winking_eye:

Thank you for the rapid response willco, you're a legend.