Commit 0c091d97 authored by Astro's avatar Astro
Browse files

rkanoid: invert accel sensor direction

this one got reversed in recent c-firmware revisions.
parent 0988fe2e
Pipeline #4146 passed with stage
in 9 minutes and 54 seconds
......@@ -212,9 +212,9 @@ fn game(level: u16, mut score: u32) -> GameResult {
paddle += PADDLE_SPEED;
}
if accel_x < 0 {
paddle = paddle.saturating_sub(-accel_x as u32);
paddle += -accel_x as u32;
} else if accel_x > 0 {
paddle += accel_x as u32;
paddle = paddle.saturating_sub(accel_x as u32);
}
paddle = paddle
.max(paddle_size)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment