This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <sys/fcntl.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <errno.h> | |
#include <limits.h> | |
#include <assert.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TL;DR | |
Force feedback does not work with the Logitech G29 driving wheel on "DiRT Rally | |
2.0" when running under the Linux/Proton environment. This leads to a | |
sub-satisfactory gaming experience. | |
I have traced the issue to a SDL2 call, SDL_HapticUpdateEffect(), made by the | |
the following Proton patch: | |
https://git.froggi.es/tkg/PKGBUILDS/blob/2b563056f83e555bef56616a9a48578b1ea0758c/wine-tkg-git/wine-tkg-patches/proton-sdl-joy.patch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -Naur SDL2-2.0.10/src/haptic/DSDL_Log.h SDL2-2.0.10.x/src/haptic/DSDL_Log.h | |
--- SDL2-2.0.10/src/haptic/DSDL_Log.h 1969-12-31 16:00:00.000000000 -0800 | |
+++ SDL2-2.0.10.x/src/haptic/DSDL_Log.h 2019-09-04 10:06:57.000000000 -0700 | |
@@ -0,0 +1,62 @@ | |
+#ifndef DSDL_LOG_H | |
+#define DSDL_LOG_H | |
+ | |
+#include <stdarg.h> | |
+ | |
+#define DSDL_LOG_ENABLED 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -Naur SDL2-2.0.10/src/haptic/linux/SDL_syshaptic.c SDL2-2.0.10.patched/src/haptic/linux/SDL_syshaptic.c | |
--- SDL2-2.0.10/src/haptic/linux/SDL_syshaptic.c 2019-07-24 21:32:36.000000000 -0700 | |
+++ SDL2-2.0.10.patched/src/haptic/linux/SDL_syshaptic.c 2019-09-04 10:52:36.784736281 -0700 | |
@@ -974,6 +974,7 @@ | |
SDL_HapticEffect * data) | |
{ | |
struct ff_effect linux_effect; | |
+ int retry_count = 0; | |
/* Create the new effect */ |