
88 4. The Game Engine
if(mouseCaptured)
ReleaseCapture(); // Release mouse
}
Listing 4.15. e Input class constructor and destructor.
e initialize function sets up the RAWINPUTDEVICE array Rid in preparation for
reading from a high-denition mouse. A standard computer mouse has a resolution of 400
dots per inch (DPI), whereas a high-denition mouse has a resolution of 800 DPI or greater.
(High-denition mouse data cannot be obtained through the standard WM_MOUSEMOVE mes-
sage.) e mouse is captured if desired and the controller state array is cleared (Listing 4.16).
Capturing a mouse directs the mouse input to the capturing window. is is typicall ...