Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/dolphin/pad/pad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,9 @@ void ClampStick(int8_t* px, int8_t* py, int8_t max, int8_t xy, int8_t min) {
return;
}

x = (x * max) / (INT8_MAX - min);
y = (y * max) / (INT8_MAX - min);

if (xy * y <= xy * x) {
int32_t d = xy * x + (max - xy) * y;
if (xy * max < d) {
Expand Down