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

Function CircleToSquare

engine/Poseidon/Input/InputProcessingSdl.cpp:344–354  ·  view source on GitHub ↗

Expands circular stick range to full square (prevents diagonal under-reach)

Source from the content-addressed store, hash-verified

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);
345 }
346};
347static SDLRumble sRumble;
348
349void SDLGamepad_SetEngine(float mag)
350{
351 sRumble.SetEngine(mag);
352}
353void SDLGamepad_PlayRamp(float beg, float end, float dur)
354{
355 sRumble.PlayRamp(beg, end, dur);
356}
357

Callers 1

ProcessJoystick_SDLFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected