Original Post
I followed the directx 8 mouse tutorial on the site and it all compiles perfectly, only the mouse position always seems to be off. I've created a mouse_x and mouse_y variable at start-up, and then everytime it calls the GetDeviceState I.. only, it seems to be off. I'm running in windowed mode but even when I toggled it to full screen it does the same, it seems to randomly get the mouse position wrong by about 400 pixels each axis, it's consistantly offset until I restart it, the amount it's offset seems to change everytime I start it up. Is it something to do with where the cursor is when the application starts? or should I be letting directx do the input buffering? Thanks!
//Keep track of movement
mouse_x += mousestate.lX;
mouse_y += mousestate.lY;