So I kept Googling and found a slightly hacky solution to this. Just set:
poke(0x7FC3F,1,1)
This turns on some special mouse capture mode that disables the cursor. That should do the trick for me, and for anyone else who gets stuck on this problem.