MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / ForceRestart

Function ForceRestart

Descent3/D3ForceFeedback.cpp:228–256  ·  view source on GitHub ↗

------------------------------------------------------------------ ForceRestart Purpose: Restores the Force Feedback system that has been put on pause from ForceShutdown. ------------------------------------------------------------------

Source from the content-addressed store, hash-verified

226// from ForceShutdown.
227// ------------------------------------------------------------------
228void ForceRestart(void) {
229 D3Force_pause = false;
230
231 if (D3Force_init) {
232 mprintf(0, "Force: Restarting Force Feedback System\n");
233 ddio_ff_Acquire(kJoy1);
234 ddio_ffb_Continue(kJoy1);
235
236 // Enable/Disable the force feedback
237 // ---------------------------------
238 if (D3Use_force_feedback)
239 ForceEnable();
240 else
241 ForceDisable();
242
243 // Enable/Disable AutoCentering
244 // ----------------------------
245 if (D3Force_auto_center)
246 ForceEnableAutoCenter();
247 else
248 ForceDisableAutoCenter();
249
250 // Set ForceFeedback Gain
251 // ----------------------
252 ForceSetGain(D3Force_gain);
253 }
254
255 ForceInit();
256}
257
258// ------------------------------------------------------------------
259// ForceDisable

Callers 1

RestartD3Function · 0.85

Calls 8

ddio_ff_AcquireFunction · 0.85
ddio_ffb_ContinueFunction · 0.85
ForceEnableFunction · 0.85
ForceDisableFunction · 0.85
ForceEnableAutoCenterFunction · 0.85
ForceDisableAutoCenterFunction · 0.85
ForceSetGainFunction · 0.85
ForceInitFunction · 0.85

Tested by

no test coverage detected