A strange one this - I noticed I was getting a periodic but regular glitch in my video application built on SDL2/vlc but only when I built SDL from the latest Windows 10 SDK + build tools. My older build from (I think) the previous Windows 10 SDK doesn’t exhibit the problem.
Basically in the main event loop what looked like every three seconds it would pause briefly, i.e. all event processing would be delayed by an additional 50-60ms or so.
So as a random idea I searched in the SDL code for the value 3000 and found that in the HIDAPI code it checks this often for new controllers. I changed this to 30,000 and lo-and-behold my glitch became every 30s instead.
I’ve now disabled HIDAPI in my build as I do not need it anyway, so this is a heads-up more than anything else.
Perhaps things like this could be performed in background threads and post an event to indicate when a controller is added/removed etc? There is already the problem with SDL where you have to do all the rendering in the main loop, so I think the event loop needs to be as slim/unbloated as possible.