dinput: Add some error checks to mouse.c.