Microsoft DirectX 8.0 (C++)

Preventing Response Delays During Debugging

When using the keyboard or mouse with Microsoft® DirectInput® under Microsoft Windows® 2000, you might notice short delays in response when you are stepping through code during a debugging session. This behavior occurs only in debug mode, so it is not seen by your application's end users. However, this behavior can be eliminated in debug mode as well by adding the Emulation value to the following registry key.

HKEY_LOCAL_MACHINE
    SOFTWARE
        Microsoft
            DirectInput
Name Type Data
Emulation DWORD 0x08 (for the mouse)

0x10 (for the keyboard)

0x18 (for both)


Without changing how DirectInput returns data, this value invokes an emulation mode that is not susceptible to those delays. The Microsoft Software Development Kit (SDK) includes two registry files—Mouse and Keyboard Emulation On.reg and Mouse and Keyboard Emulation Off.reg—to activate and deactivate this emulation mode. The files are located under (SDK root)\Samples\Multimedia\DirectInput\Bin.

Note  The Emulation value is supported only in debug mode when your device is using an Exclusive and Foreground cooperative level.