MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / disable

Method disable

Engine/source/platformWin32/winDirectInput.cpp:142–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140//------------------------------------------------------------------------------
141
142void DInputManager::disable()
143{
144 unacquire( SI_ANY, SI_ANY );
145
146 DInputDevice* dptr;
147 iterator ptr = begin();
148 while ( ptr != end() )
149 {
150 dptr = dynamic_cast<DInputDevice*>( *ptr );
151 if ( dptr )
152 {
153 removeObject( dptr );
154 //if ( dptr->getManager() )
155 //dptr->getManager()->unregisterObject( dptr );
156 delete dptr;
157 ptr = begin();
158 }
159 else
160 ptr++;
161 }
162
163 if ( mDInputInterface )
164 {
165 mDInputInterface->Release();
166 mDInputInterface = NULL;
167 }
168
169 if ( mDInputLib )
170 {
171 FreeLibrary( mDInputLib );
172 mDInputLib = NULL;
173 }
174
175 if ( mfnXInputGetState )
176 {
177 mXInputStateReset = true;
178 mfnXInputGetState = NULL;
179 mfnXInputSetState = NULL;
180 }
181
182 if ( mXInputLib )
183 {
184 FreeLibrary( mXInputLib );
185 mXInputLib = NULL;
186 }
187
188 mEnabled = false;
189}
190
191//------------------------------------------------------------------------------
192void DInputManager::onDeleteNotify( SimObject* object )

Callers

nothing calls this directly

Calls 3

beginFunction · 0.85
endFunction · 0.85
ReleaseMethod · 0.45

Tested by

no test coverage detected