mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-12-26 17:51:53 +01:00
Implement analog triggers for DSUController (#239)
This commit is contained in:
parent
3349d7b424
commit
d4879da95c
@ -164,5 +164,8 @@ ControllerState DSUController::raw_state()
|
|||||||
result.rotation.y = (float)state.data.ry / std::numeric_limits<uint8>::max();
|
result.rotation.y = (float)state.data.ry / std::numeric_limits<uint8>::max();
|
||||||
result.rotation.y = (result.rotation.y * 2.0f) - 1.0f;
|
result.rotation.y = (result.rotation.y * 2.0f) - 1.0f;
|
||||||
|
|
||||||
return result;
|
result.trigger.x = (float)state.data.l2 / std::numeric_limits<uint8>::max();
|
||||||
|
result.trigger.y = (float)state.data.r2 / std::numeric_limits<uint8>::max();
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user