- RECT window_rect;
- window_rect.left = window_x;
- window_rect.top = window_y;
- window_rect.right = window_x + window_width;
- window_rect.bottom = window_y + window_height;
- if (mouseparmsvalid)
- restore_spi = SystemParametersInfo (SPI_SETMOUSE, 0, newmouseparms, 0);
- SetCursorPos (window_center_x, window_center_y);
- SetCapture (mainwindow);
- ClipCursor (&window_rect);
+ vid_usingmouse = true;
+ cl_ignoremousemove = true;
+ if (dinput && g_pMouse)
+ {
+ IDirectInputDevice_Acquire(g_pMouse);
+ dinput_acquired = true;
+ }
+ else
+ {
+ RECT window_rect;
+ window_rect.left = window_x;
+ window_rect.top = window_y;
+ window_rect.right = window_x + vid.width;
+ window_rect.bottom = window_y + vid.height;
+ if (mouseparmsvalid)
+ restore_spi = SystemParametersInfo (SPI_SETMOUSE, 0, newmouseparms, 0);
+ SetCursorPos ((window_x + vid.width / 2), (window_y + vid.height / 2));
+ SetCapture (mainwindow);
+ ClipCursor (&window_rect);
+ }
+ ShowCursor (false);