panzi/qjoypad

Request ability to adjust rapid fire rate in the menu

penalvch-zz opened this issue · 3 comments

Downstream report:
https://bugs.launchpad.net/ubuntu/+source/qjoypad/+bug/1397824

  1. lsb_release -rd
    Description: Ubuntu 14.04.1 LTS
    Release: 14.04

  2. apt-cache policy qjoypad
    qjoypad:
    Installed: 4.1.0-0ubuntu1
    Candidate: 4.1.0-0ubuntu1
    Version table:
    *** 4.1.0-0ubuntu1 0
    500 http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
    100 /var/lib/dpkg/status

  3. What is expected is that one has the option to adjust the rapid fire rate in the menu.

  4. Currently, it's a static pre-compiled value in https://github.com/panzi/qjoypad/blob/master/src/constant.h . However, not all games react well to this rate. It would be nice to be able to adjust this in the menu so all buttons set to rapid fire would be set to this adjustable rate.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: qjoypad 4.1.0-0ubuntu1
ProcVersionSignature: Ubuntu 3.13.0-40.69-generic 3.13.11.10
Uname: Linux 3.13.0-40-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.5
Architecture: amd64
CurrentDesktop: Unity
Date: Sun Nov 30 23:15:45 2014
InstallationDate: Installed on 2014-06-21 (162 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140417)
SourcePackage: qjoypad
UpgradeStatus: No upgrade log present (probably fresh install)

I'll probably take a look at this at the weekend. I never touched that part of that code before, so I have to find out how that works in qjoypad first.

  1. What is expected is that one has the option to adjust the rapid fire rate in the menu.

Globally for qjoypad or for each button? For each button might be a bit tricky, because there is only one QTimer that handles all the rapid firings.

panzi, thank you for your quick response. Regarding your question:

"Globally for qjoypad or for each button?"

Let the scope of this report be globally only.

Just to advise, antimicro 2.9.1 offers the option to adjust globally the Key Repeat Rate in 1 time/s increments, as well as adjust the Delay in 1 ms increments -> https://github.com/Ryochan7/antimicro . Unfortunately, antimicro it is not available in the Ubuntu repositories, unlike qjoypad which is available.

For each button might be a bit tricky, because there is only one QTimer that handles all the rapid firings.

Each instance of Button has its own QTimer along with its own tick counter that are used to handle its own assigned rapid fire event. The button timer is activated upon a button press and stopped upon a button release.

In my use, I find that there are cases where specifying the rapid fire rate per button is useful since some actions should be performed at a different rate than others. Allowing a profile level rate should work fine for most use cases as long as it is configurable to account for how different programs process events.