MickGyver/DaemonBite-Arcade-Encoder

Debounce (?) issues in Steam

Closed this issue · 2 comments

I'm not entirely sure what's going on, but the Daemonbite will continually trigger down after pressing up on the controller while in Steam's controller configuration, and also when using it in the Steam UI (on both Linux & SteamOS which is just Linux anyhow) & any games launched from Steam. Using the joystick outside of Steam is fine, so there's obviously something funky about the controller layer with Steam.

I found this thread on reddit which claims that enabling DEBOUNCE fixes this, but I've had no success. I've also tried changing the value for DEBOUNCE_TIME up to 50 too but its made no difference so far.

I just tried enabling PS3 mode and direction buttons work, but now R2 seems to be triggering repeated presses

I ended up with this franken setup davewongillies@427979c where I have PS3 joystick mode, but keep the normal B11/B12 buttons. I also had to bump DEBOUNCE_TIME up to 100 (I tried 50 to no avail, but just jumped to 100 so perhaps something in between works).

--- a/DaemonBiteArcadeEncoder/DaemonBiteArcadeEncoder.ino
+++ b/DaemonBiteArcadeEncoder/DaemonBiteArcadeEncoder.ino
@@ -23,11 +23,12 @@
 
 #include "Gamepad.h"
 
-//#define PS3                 // PS3 (ScpToolkit) compatibility (Comment out for joystick=X/Y-Axis and B11/B12 as normal buttons)
+#define PS3                 // PS3 joystick (ScpToolkit) compatibility (Comment out for joystick=X/Y-Axis)
+//#define PS3_BUTTONS       // PS3 button (ScpToolkit) compatibility (B11/B12 as normal buttons)
 //#define NEOGEO
 
-#define DEBOUNCE 0          // 1=Diddly-squat-Delay-Debouncing™ activated, 0=Debounce deactivated
-#define DEBOUNCE_TIME 10    // Debounce time in milliseconds
+#define DEBOUNCE 1          // 1=Diddly-squat-Delay-Debouncing™ activated, 0=Debounce deactivated
+#define DEBOUNCE_TIME 100   // Debounce time in milliseconds
 //#define DEBUG             // Enables debugging (sends debug data to usb serial)
 
 #ifdef NEOGEO
@@ -167,7 +168,7 @@ void loop()
     // Has button inputs changed?
     if(buttons != buttonsPrev)
     {
-      #ifdef PS3
+      #ifdef PS3_BUTTONS
         Gamepad._GamepadReport.buttons = buttons & 0x3FF;
         if(buttons & 0x400) // B11
           Gamepad._GamepadReport.Z = -1;

Perhaps this may be of help to someone else facing the same issue with Steam, but I'll be closing this issue as I've moved my joystick to another project. Thanks.