summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/plugins/brickmania.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/plugins/brickmania.c b/apps/plugins/brickmania.c
index bd37044a52..c36aa0ad9e 100644
--- a/apps/plugins/brickmania.c
+++ b/apps/plugins/brickmania.c
@@ -2031,7 +2031,7 @@ static int brickmania_game_loop(void)
if (check_lines(&misc_line, &screen_edge, &pt_hit))
{
/* Reverse direction */
- ball[k].speedx = -ball[k].speedx;
+ ball[k].speedx = abs(ball[k].speedx);
/* Re-position ball in gameboard */
ball[k].tempy = pt_hit.y;
@@ -2047,7 +2047,7 @@ static int brickmania_game_loop(void)
if (check_lines(&misc_line, &screen_edge, &pt_hit))
{
/* Reverse direction */
- ball[k].speedx = -ball[k].speedx;
+ ball[k].speedx = -abs(ball[k].speedx);
/* Re-position ball in gameboard */
ball[k].tempy = pt_hit.y;