Bug#767685: prboom-plus: Cannot move diagonally with joystick

Fabian Greffrath fabian at greffrath.com
Sun Nov 2 15:55:05 UTC 2014


Hey Andrey,

I got the following bug reported against the prboom-plus package in
Debian. Would you mind applying the patch?

Best regards,

Fabian

Am Samstag, den 01.11.2014, 13:28 -0700 schrieb Eric Duhamel: 
> Source: prboom-plus
> Severity: normal
> 
> Dear Maintainer,
> 
> 	I started using PrBoom-Plus to play Freedoom using a
> gamepad with a joystick. While playing, I tried to move forward
> and left at the same time by tilting the joystick diagonally.
> However, the engine would not respond to input when the joystick
> was in this position, and would only respond if the joystick was
> tilted full-left or full-forward. I would expect to be able to
> move forward and left at the same time in this situation.
> 
> 	I took a look at the code in PrBoom-Plus for joysticks 
> and found a rather high threshhold ( > 30000 ), while I noticed
> my joystick barely reaches over 27000 when titled diagonally.
> I've heard many modern joysticks are like this. I made the 
> following patch that seems to fix the problem based on 
> PrBoom-Plus in Debian Unstable.
> 
> ***** BEGIN RAW DIFF for prboom-plus_2.5.1.4~svn4403+dfsg1-1 *****
> --- a/src/SDL/i_joy.c
> +++ b/src/SDL/i_joy.c
> @@ -80,10 +80,10 @@
>      (SDL_JoystickGetButton(joystick, 6)<<6) |
>      (SDL_JoystickGetButton(joystick, 7)<<7);
>    axis_value = SDL_JoystickGetAxis(joystick, 0) / 3000;
> -  if (abs(axis_value)<10) axis_value=0;
> +  if (abs(axis_value)<7) axis_value=0;
>    ev.data2 = axis_value;
>    axis_value = SDL_JoystickGetAxis(joystick, 1) / 3000;
> -  if (abs(axis_value)<10) axis_value=0;
> +  if (abs(axis_value)<7) axis_value=0;
>    ev.data3 = axis_value;
>  
>    D_PostEvent(&ev);
> ***** END RAW DIFF for prboom-plus_2.5.1.4~svn4403+dfsg1-1 *****
> 
> -- System Information:
> Debian Release: jessie/sid
> Architecture: i386 (i686)
> 
> Kernel: Linux 3.13.0-37-lowlatency (SMP w/2 CPU cores; PREEMPT)
> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> 
> _______________________________________________
> Pkg-games-devel mailing list
> Pkg-games-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-devel
> 



More information about the Pkg-games-devel mailing list