Perhaps not accidentally, I have looked into same things lately (although only on a theoretical level). VBL based cursors gets *very* tricky once you want to keep triple-buffering in place. Of course, not impossible to overcome and especially if you have true hardware cursors available, that way you don't have to solve dirty rects.agranlund wrote: 07 Jun 2026 12:47 Probably what needs to happen now for a more polished experience is:
- detach mouse cursor redraw from main loop.
some gfxcards has support hardware cursor but for best compatibility I think a software solution like in ScummST would be first priority.
(just redraw the cursor at every VBL if changed, essentially)
- detach music from main loop.
avoid midi/adlib timing jitter as well as stalls if mainloop is busy for a length of time (loading etc)
MIDI timing is a bit easier because audio code is assumed to work in a separate thread but then there's the issue I had been fighting for a while (and put it on hold to look into less frustrating things) -- how to actually keep the multithreading part while not stepping into the complex locking/unlocking territory.
But maybe both issues need just a fresh pair of eyes and you are definitely the best candidate for that. ;)
Btw, while waiting for my family at Brisbane airport: ;)

