From ff4ce93a01b013f8845da44ec5c25d10d23290ca Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Thu, 18 Feb 2021 18:45:12 +0300 Subject: [PATCH] fix angle adjusment in Mix_SetPosition Backported from mainstream: https://github.com/libsdl-org/SDL_mixer/commit/502f4e217dcb1f902a6eba00cae13fdeb6d3bb5d --- src/effect_position.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/effect_position.c b/src/effect_position.c index 1f152381..af3b43fd 100644 --- a/src/effect_position.c +++ b/src/effect_position.c @@ -2034,7 +2034,9 @@ int SDLCALLCC Mix_SetPosition(int channel, Sint16 angle, Uint8 distance) if (f == NULL) return(0); - angle = SDL_abs(angle) % 360; /* make angle between 0 and 359. */ + /* make angle between 0 and 359. */ + angle %= 360; + if (angle < 0) angle += 360; Mix_LockAudio(); args = get_position_arg(channel);