From 261b7caeff1b2881b5c26ac7563af64c7985c2fd Mon Sep 17 00:00:00 2001 From: Alex Vanderveen Date: Sat, 7 Mar 2026 23:20:23 -0500 Subject: [PATCH 01/10] 2026 Modern Linux evdev patch Patches to the build scripts to use new dependencies and to use evdev instead of joydev on linux which involved updates to several files, assisted by Cursor Composer AI. Tested working on CachyOS 03/07/2026 I was able to make and install over the original version I was testing, and the evdev patch has updated: joydev is deprecated and calls are not supported. evdev code switching resulted in restoring proper function for analog inputs/axises/joysticks, and support for any other modern controller features afforded by evdev over joydev. GIMX appears to be abandoned, but I'll make an effort to merge, however I may take this over and just keep it alive and working with the features it has now. --- core/config_reader.c | 1 + core/connectors/bluetooth/linux/bt_mgmt.c | 2 +- core/controller.h | 2 +- core/display.c | 2 +- core/gimx.c | 3 ++- shared/gimxcontroller/src/controller.c | 2 +- shared/gimxdownloader/Downloader.cpp | 10 +++++----- 7 files changed, 12 insertions(+), 10 deletions(-) diff --git a/core/config_reader.c b/core/config_reader.c index 451fc486..5b3d5952 100644 --- a/core/config_reader.c +++ b/core/config_reader.c @@ -17,6 +17,7 @@ #include "../directories.h" #include "macros.h" #include +#include /* * These variables are used to read the configuration. diff --git a/core/connectors/bluetooth/linux/bt_mgmt.c b/core/connectors/bluetooth/linux/bt_mgmt.c index 5d9e1a66..4e0952d9 100644 --- a/core/connectors/bluetooth/linux/bt_mgmt.c +++ b/core/connectors/bluetooth/linux/bt_mgmt.c @@ -322,7 +322,7 @@ static int read_link_keys(uint16_t index, uint16_t nb_keys, bdaddr_t bdaddrs[nb_ bdaddr_t ba; char dongle_bdaddr[18]; - if(bt_device_abs_get(bt_abs_value)->get_bdaddr(index, &ba) < 0) + if(bt_device_abs_get()->get_bdaddr(index, &ba) < 0) { fprintf(stderr, "can't read device bdaddr\n"); return -1; diff --git a/core/controller.h b/core/controller.h index b0db84bc..f0e5a212 100644 --- a/core/controller.h +++ b/core/controller.h @@ -82,7 +82,7 @@ typedef struct { int mperiod; } s_adapter; -int adapter_detect(); +e_gimx_status adapter_detect(); int adapter_start(); int adapter_send(); e_gimx_status adapter_clean(); diff --git a/core/display.c b/core/display.c index 575b29e9..f8fee3b8 100644 --- a/core/display.c +++ b/core/display.c @@ -8,7 +8,7 @@ #ifdef PDCURSES #include #else -#include +#include #endif #include "display.h" diff --git a/core/gimx.c b/core/gimx.c index 700cae94..a5709df0 100755 --- a/core/gimx.c +++ b/core/gimx.c @@ -8,6 +8,7 @@ #include //to print errors #include //to print errors #include //PATH_MAX +#include #ifndef WIN32 #include //to disable/enable echo @@ -529,7 +530,7 @@ int main(int argc, char *argv[]) sprintf(file, "%s/gimx.status", tmp); } free(tmp); - if (file != NULL && file[0] != '\0') + if (file[0] != '\0') { FILE * fp = gfile_fopen(file, "w"); if (fp != NULL) diff --git a/shared/gimxcontroller/src/controller.c b/shared/gimxcontroller/src/controller.c index 8b270b5e..4718d040 100644 --- a/shared/gimxcontroller/src/controller.c +++ b/shared/gimxcontroller/src/controller.c @@ -358,7 +358,7 @@ int controller_get_axis_index(const char* name) int i; for(i=0; iaxes[i].name) + if(controllers[C_TYPE_SIXAXIS]->axes[i].name[0]) { if(!strcmp(controllers[C_TYPE_SIXAXIS]->axes[i].name, name)) { diff --git a/shared/gimxdownloader/Downloader.cpp b/shared/gimxdownloader/Downloader.cpp index 57e53795..410d18d3 100644 --- a/shared/gimxdownloader/Downloader.cpp +++ b/shared/gimxdownloader/Downloader.cpp @@ -129,9 +129,9 @@ static size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream) { return written; } -static int progress_callback(void * clientp, double dltotal, double dlnow, double ultotal __attribute__((unused)), - double ulnow __attribute__((unused))) { - return ((Downloader *) clientp)->progress(dlnow, dltotal); +static int progress_callback(void *clientp, curl_off_t dltotal, curl_off_t dlnow, + curl_off_t ultotal __attribute__((unused)), curl_off_t ulnow __attribute__((unused))) { + return ((Downloader *) clientp)->progress((double) dlnow, (double) dltotal); } int Downloader::progress(double dlnow, double dltotal) { @@ -209,8 +209,8 @@ Downloader::DownloaderStatus Downloader::download(const std::string& url, const curl_easy_setopt(m_curl_handle, CURLOPT_WRITEFUNCTION, write_data); curl_easy_setopt(m_curl_handle, CURLOPT_FILE, outfile); - curl_easy_setopt(m_curl_handle, CURLOPT_PROGRESSFUNCTION, progress_callback); - curl_easy_setopt(m_curl_handle, CURLOPT_PROGRESSDATA, this); + curl_easy_setopt(m_curl_handle, CURLOPT_XFERINFOFUNCTION, progress_callback); + curl_easy_setopt(m_curl_handle, CURLOPT_XFERINFODATA, this); curl_easy_setopt(m_curl_handle, CURLOPT_NOPROGRESS, 0L); //curl_easy_setopt(m_curl_handle, CURLOPT_VERBOSE, 1L); From 3e45bb750acb4b4534aba819305111320ca3b1e8 Mon Sep 17 00:00:00 2001 From: Alex Vanderveen Date: Sat, 7 Mar 2026 23:22:04 -0500 Subject: [PATCH 02/10] 2026 Modern Linux evdev patch (2) forked smaller modules associated with the project that required updates also. --- shared/gimxhid | 2 +- shared/gimxinput | 2 +- shared/gimxusb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/shared/gimxhid b/shared/gimxhid index 36a98335..2dbc2639 160000 --- a/shared/gimxhid +++ b/shared/gimxhid @@ -1 +1 @@ -Subproject commit 36a98335345ca9d0366d5900300c4bdfab1335f2 +Subproject commit 2dbc26390aa29b8f4fa7b0829067dfe3d0ee1167 diff --git a/shared/gimxinput b/shared/gimxinput index 4d087a17..0580f952 160000 --- a/shared/gimxinput +++ b/shared/gimxinput @@ -1 +1 @@ -Subproject commit 4d087a17244c5f55863658522705445e1c838deb +Subproject commit 0580f95202d79842fe092e6e18725b788d18c48c diff --git a/shared/gimxusb b/shared/gimxusb index 15d6988b..62600766 160000 --- a/shared/gimxusb +++ b/shared/gimxusb @@ -1 +1 @@ -Subproject commit 15d6988b3246daaf4abf9c748bd18a73e4da534f +Subproject commit 626007669e9d8a06725ccd9a51b6ff9100fc48db From d4b2f2c9dd0a64421ff67d77c967d0784fb74517 Mon Sep 17 00:00:00 2001 From: Alex Vanderveen Date: Sun, 8 Mar 2026 18:49:59 -0400 Subject: [PATCH 03/10] Update README.md --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 44ad699a..509236db 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,23 @@ GIMX [![Build Status](https://travis-ci.com/matlo/GIMX.svg?branch=master)](https://travis-ci.com/matlo/GIMX) +This document needs updating. This is a fork of what I assume is abandoned software since the dev stopped selling GIMX adapters and his forum and the repo are dead for over 5 years. + +I've updated code in GIMX to use modern Linux dependencies so it builds on updated systems, tested on cachyos. I've also updated joypad calls and functions to use evdev now instead of joydev on Linux. This makes the app work again where it only functioned with simple digital inputs before and not analog axis or other features. + +At this time the config editor is only capable of detecting the evdev controller in "slot 1" so you must disconnect and reconnect stuff to get into slot 1 to recognize it, but it supports full features of Linux devices again. + +make +sudo make install + +That's all you (should) need to do to install it on Linux. + +I am assuming the original code works on Windows still as is, so Windows users should try that first, the original project has executable binaries for Windows ready for you. + +I do not know how far I will take this project but I at least intend to make evdev work a little better and see where it goes after that. + +.... + GIMX is a free software that allows to use a computer as a hub for your gaming devices. It works on Windows® and GNU/Linux platforms. It is compatible with Playstation® and Xbox® gaming consoles. The connection between the computer and the gaming console is performed using a USB adapter – [get one on the GIMX shop!](https://blog.gimx.fr/product/gimx-adapter/) – or a Bluetooth® dongle (PS3/PS4 only). The capabilities depend on the platform, the connection method, and the gaming platform. Links: From 965298b366f7fe9d353cfbee8df7d8ff0760e235 Mon Sep 17 00:00:00 2001 From: Alex Vanderveen Date: Sun, 8 Mar 2026 18:50:18 -0400 Subject: [PATCH 04/10] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 509236db..7ae528e7 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,10 @@ I've updated code in GIMX to use modern Linux dependencies so it builds on updat At this time the config editor is only capable of detecting the evdev controller in "slot 1" so you must disconnect and reconnect stuff to get into slot 1 to recognize it, but it supports full features of Linux devices again. +``` make sudo make install +``` That's all you (should) need to do to install it on Linux. From d93e5637635109f91b8adc145ad9aad0aa09963f Mon Sep 17 00:00:00 2001 From: Alex Vanderveen Date: Sun, 8 Mar 2026 22:24:33 -0400 Subject: [PATCH 05/10] evdev patches Updating syscalls on linux to use evdev instead of joydev, tested changes working with multiple devices connected at once and correct device identifications as expected --- core/config_reader.c | 1 + core/connectors/bluetooth/linux/bt_mgmt.c | 2 +- core/controller.h | 2 +- core/display.c | 2 +- core/gimx.c | 3 ++- shared/gimxcontroller/src/controller.c | 2 +- shared/gimxdownloader/Downloader.cpp | 10 +++++----- 7 files changed, 12 insertions(+), 10 deletions(-) diff --git a/core/config_reader.c b/core/config_reader.c index 451fc486..803e697c 100644 --- a/core/config_reader.c +++ b/core/config_reader.c @@ -3,6 +3,7 @@ License: GPLv3 */ +#include #include #include "config_reader.h" #include diff --git a/core/connectors/bluetooth/linux/bt_mgmt.c b/core/connectors/bluetooth/linux/bt_mgmt.c index 5d9e1a66..4e0952d9 100644 --- a/core/connectors/bluetooth/linux/bt_mgmt.c +++ b/core/connectors/bluetooth/linux/bt_mgmt.c @@ -322,7 +322,7 @@ static int read_link_keys(uint16_t index, uint16_t nb_keys, bdaddr_t bdaddrs[nb_ bdaddr_t ba; char dongle_bdaddr[18]; - if(bt_device_abs_get(bt_abs_value)->get_bdaddr(index, &ba) < 0) + if(bt_device_abs_get()->get_bdaddr(index, &ba) < 0) { fprintf(stderr, "can't read device bdaddr\n"); return -1; diff --git a/core/controller.h b/core/controller.h index b0db84bc..f0e5a212 100644 --- a/core/controller.h +++ b/core/controller.h @@ -82,7 +82,7 @@ typedef struct { int mperiod; } s_adapter; -int adapter_detect(); +e_gimx_status adapter_detect(); int adapter_start(); int adapter_send(); e_gimx_status adapter_clean(); diff --git a/core/display.c b/core/display.c index 575b29e9..f8fee3b8 100644 --- a/core/display.c +++ b/core/display.c @@ -8,7 +8,7 @@ #ifdef PDCURSES #include #else -#include +#include #endif #include "display.h" diff --git a/core/gimx.c b/core/gimx.c index 700cae94..b1bc241e 100755 --- a/core/gimx.c +++ b/core/gimx.c @@ -34,6 +34,7 @@ #include "../directories.h" #include #include +#include #include #include @@ -529,7 +530,7 @@ int main(int argc, char *argv[]) sprintf(file, "%s/gimx.status", tmp); } free(tmp); - if (file != NULL && file[0] != '\0') + if (file[0] != '\0') { FILE * fp = gfile_fopen(file, "w"); if (fp != NULL) diff --git a/shared/gimxcontroller/src/controller.c b/shared/gimxcontroller/src/controller.c index 8b270b5e..4718d040 100644 --- a/shared/gimxcontroller/src/controller.c +++ b/shared/gimxcontroller/src/controller.c @@ -358,7 +358,7 @@ int controller_get_axis_index(const char* name) int i; for(i=0; iaxes[i].name) + if(controllers[C_TYPE_SIXAXIS]->axes[i].name[0]) { if(!strcmp(controllers[C_TYPE_SIXAXIS]->axes[i].name, name)) { diff --git a/shared/gimxdownloader/Downloader.cpp b/shared/gimxdownloader/Downloader.cpp index 57e53795..e6c939f6 100644 --- a/shared/gimxdownloader/Downloader.cpp +++ b/shared/gimxdownloader/Downloader.cpp @@ -129,9 +129,9 @@ static size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream) { return written; } -static int progress_callback(void * clientp, double dltotal, double dlnow, double ultotal __attribute__((unused)), - double ulnow __attribute__((unused))) { - return ((Downloader *) clientp)->progress(dlnow, dltotal); +static int xferinfo_callback(void * clientp, curl_off_t dltotal, curl_off_t dlnow, + curl_off_t ultotal __attribute__((unused)), curl_off_t ulnow __attribute__((unused))) { + return ((Downloader *) clientp)->progress(static_cast(dlnow), static_cast(dltotal)); } int Downloader::progress(double dlnow, double dltotal) { @@ -209,8 +209,8 @@ Downloader::DownloaderStatus Downloader::download(const std::string& url, const curl_easy_setopt(m_curl_handle, CURLOPT_WRITEFUNCTION, write_data); curl_easy_setopt(m_curl_handle, CURLOPT_FILE, outfile); - curl_easy_setopt(m_curl_handle, CURLOPT_PROGRESSFUNCTION, progress_callback); - curl_easy_setopt(m_curl_handle, CURLOPT_PROGRESSDATA, this); + curl_easy_setopt(m_curl_handle, CURLOPT_XFERINFOFUNCTION, xferinfo_callback); + curl_easy_setopt(m_curl_handle, CURLOPT_XFERINFODATA, this); curl_easy_setopt(m_curl_handle, CURLOPT_NOPROGRESS, 0L); //curl_easy_setopt(m_curl_handle, CURLOPT_VERBOSE, 1L); From 14858fb608579c031286e90dff3458d3e4459765 Mon Sep 17 00:00:00 2001 From: Alex Vanderveen Date: Sun, 8 Mar 2026 23:19:08 -0400 Subject: [PATCH 06/10] Update README.md --- README.md | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/README.md b/README.md index 7ae528e7..44ad699a 100644 --- a/README.md +++ b/README.md @@ -3,25 +3,6 @@ GIMX [![Build Status](https://travis-ci.com/matlo/GIMX.svg?branch=master)](https://travis-ci.com/matlo/GIMX) -This document needs updating. This is a fork of what I assume is abandoned software since the dev stopped selling GIMX adapters and his forum and the repo are dead for over 5 years. - -I've updated code in GIMX to use modern Linux dependencies so it builds on updated systems, tested on cachyos. I've also updated joypad calls and functions to use evdev now instead of joydev on Linux. This makes the app work again where it only functioned with simple digital inputs before and not analog axis or other features. - -At this time the config editor is only capable of detecting the evdev controller in "slot 1" so you must disconnect and reconnect stuff to get into slot 1 to recognize it, but it supports full features of Linux devices again. - -``` -make -sudo make install -``` - -That's all you (should) need to do to install it on Linux. - -I am assuming the original code works on Windows still as is, so Windows users should try that first, the original project has executable binaries for Windows ready for you. - -I do not know how far I will take this project but I at least intend to make evdev work a little better and see where it goes after that. - -.... - GIMX is a free software that allows to use a computer as a hub for your gaming devices. It works on Windows® and GNU/Linux platforms. It is compatible with Playstation® and Xbox® gaming consoles. The connection between the computer and the gaming console is performed using a USB adapter – [get one on the GIMX shop!](https://blog.gimx.fr/product/gimx-adapter/) – or a Bluetooth® dongle (PS3/PS4 only). The capabilities depend on the platform, the connection method, and the gaming platform. Links: From 59131b090a94a845ea88b01ef544d0ace01de1b9 Mon Sep 17 00:00:00 2001 From: Alex Vanderveen Date: Sun, 8 Mar 2026 23:33:10 -0400 Subject: [PATCH 07/10] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 44ad699a..64d7ea98 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ GIMX GIMX is a free software that allows to use a computer as a hub for your gaming devices. It works on Windows® and GNU/Linux platforms. It is compatible with Playstation® and Xbox® gaming consoles. The connection between the computer and the gaming console is performed using a USB adapter – [get one on the GIMX shop!](https://blog.gimx.fr/product/gimx-adapter/) – or a Bluetooth® dongle (PS3/PS4 only). The capabilities depend on the platform, the connection method, and the gaming platform. +GIMX on Linux now has evdev support, which is more supported on modern Linux kernels. + Links: * [Documentation](https://wiki.gimx.fr) * [Source code](https://gimx.fr/source) From 5bbac570d88fbb9d47970d84e71d0ab6ecbb2f6b Mon Sep 17 00:00:00 2001 From: Alex Vanderveen Date: Thu, 12 Mar 2026 21:31:36 -0400 Subject: [PATCH 08/10] Update README with evdev support and compatibility notes Added warning about GIMX fork and evdev support issues. --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 64d7ea98..2cb20853 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,14 @@ GIMX is a free software that allows to use a computer as a hub for your gaming d GIMX on Linux now has evdev support, which is more supported on modern Linux kernels. +This is a fork of GIMX for Linux systems where evdev support has resulted in joydev neglect and degraded functionality. + +If you find you're using GIMX by matlo on a certain non-ubuntu distro and it just refuses to do something like, accept proper analog joystick or throttle inputs, it might be a critical kernel level difference in expected behaviour and your best bet is to either swithc to the OS distro he built the software on, or try out evdev. + +**WARNING** this version is not officially supported by matlo, and while you can download all the configs from their repository, they will NOT work! This is because evdev ID numbers are different and names of devices might be fetched differently. You won't be able to match any old configs. But you CAN still download them and use them as references for remapping, as many of them have nice advanced features and offer structure to work from. + +Please report any bugs with identifying your devices, and send your device and device ID found with `evdev-test` or `cat /proc/bus/input/devices` + Links: * [Documentation](https://wiki.gimx.fr) * [Source code](https://gimx.fr/source) From 8e0338383328f58c9b5b786d12d2b991e5a4299b Mon Sep 17 00:00:00 2001 From: Alex Vanderveen Date: Wed, 18 Mar 2026 13:09:04 -0400 Subject: [PATCH 09/10] Rename project from GIMX to GIMX-evdev --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2cb20853..5c95b42a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -GIMX +GIMX-evdev ==== [![Build Status](https://travis-ci.com/matlo/GIMX.svg?branch=master)](https://travis-ci.com/matlo/GIMX) From e3f05b0f13f4d0db7524063ba31f532e31edfe3c Mon Sep 17 00:00:00 2001 From: Alex Vanderveen Date: Thu, 2 Apr 2026 12:44:49 -0400 Subject: [PATCH 10/10] Update device limit 256 > 1024 3 locations updated joypad, mkb, and ginput.h device max limit from 256 to 1024,, because evdev device event IDs often bump up higher than necessary for whatever reason and quickly populate ranges higher than 256. --- shared/gimxinput | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/gimxinput b/shared/gimxinput index 0580f952..01350cf3 160000 --- a/shared/gimxinput +++ b/shared/gimxinput @@ -1 +1 @@ -Subproject commit 0580f95202d79842fe092e6e18725b788d18c48c +Subproject commit 01350cf3cb3171bc3e49230d94b635c5db1e8709