----------------------------------------------------------------------------- Name: FreeDirectInput() Desc: Initialize the DirectInput variables. -----------------------------------------------------------------------------
| 183 | // Desc: Initialize the DirectInput variables. |
| 184 | //----------------------------------------------------------------------------- |
| 185 | void DirectInputUninit( HWND hDlg ) |
| 186 | { |
| 187 | LogFileOutput("DirectInputUninit\n"); |
| 188 | |
| 189 | // Unacquire the device one last time just in case |
| 190 | // the app tried to exit while the device is still acquired. |
| 191 | if( g_pMouse ) |
| 192 | { |
| 193 | HRESULT hr = g_pMouse->Unacquire(); |
| 194 | LogFileOutput("DirectInputUninit: Unacquire(), hr=0x%08X\n", hr); |
| 195 | } |
| 196 | |
| 197 | // Release any DirectInput objects. |
| 198 | SAFE_RELEASE( g_pMouse ); |
| 199 | SAFE_RELEASE( g_pDI ); |
| 200 | |
| 201 | if (g_TimerIDEvent) |
| 202 | { |
| 203 | BOOL bRes = KillTimer(hDlg, g_TimerIDEvent); |
| 204 | LogFileOutput("DirectInputUninit: KillTimer(), res=%d\n", bRes ? 1 : 0); |
| 205 | g_TimerIDEvent = 0; |
| 206 | } |
| 207 | } |
| 208 | |
| 209 | //----------------------------------------------------------------------------- |
| 210 | // Name: ReadImmediateData() |
no test coverage detected