MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / ApplyDeadzone

Function ApplyDeadzone

engine/Poseidon/Input/InputProcessingSdl.cpp:336–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

334 if (left < 0.10f)
335 left = 0;
336 else if (left < 0.20f)
337 left = 0.20f;
338 if (right < 0.05f)
339 right = 0;
340 else if (right < 0.10f)
341 right = 0.10f;
342 left = fminf(left, 1.0f);
343 right = fminf(right, 1.0f);
344 SDL_RumbleGamepad(g, (uint16_t)(left * 65535.f), (uint16_t)(right * 65535.f), 50);

Callers 1

ProcessJoystick_SDLFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected