MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / DirectInputUninit

Function DirectInputUninit

source/Windows/DirectInput.cpp:185–207  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Name: FreeDirectInput() Desc: Initialize the DirectInput variables. -----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

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()

Callers 2

DirectInputInitFunction · 0.85
WndProcMethod · 0.85

Calls 1

LogFileOutputFunction · 0.85

Tested by

no test coverage detected