# SDL: Ignore the device version for Atari vcs controllers

**URL:** <https://discourse.libsdl.org/t/sdl-ignore-the-device-version-for-atari-vcs-controllers/31726>\
**Category:** SDL Commits\
**Created:** [June 3, 2021, 6:44pm UTC](https://discourse.libsdl.org/t/sdl-ignore-the-device-version-for-atari-vcs-controllers/31726 "2021-06-03T18:44:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SDLPushPostBot](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/sdlpushpostbot/32/4370_2.png) [@SDLPushPostBot](https://discourse.libsdl.org/u/SDLPushPostBot)\
**Post date:** [June 3, 2021, 6:44pm UTC](https://discourse.libsdl.org/t/sdl-ignore-the-device-version-for-atari-vcs-controllers/31726/1 "2021-06-03T18:44:02Z")

</div>

> <https://github.com/libsdl-org/SDL/commit/de4ba6ebc05ea6ff48a4ec6cb4731cd97b109949>
>
> At least on bluetooth the guid user the version reported by the
> bluetooth devic…e. Which for Atari vcs controllers is the firmware
> version. However the mapping will stay the same regardless of firmware
> version, so ignore the version entirely to avoid needing a new mapping
> entry for each firmware version.
> 
> Signed-off-by: Sjoerd Simons \<sjoerd@collabora.com\>

```diff
From de4ba6ebc05ea6ff48a4ec6cb4731cd97b109949 Mon Sep 17 00:00:00 2001
From: Sjoerd Simons <[EMAIL REDACTED]>
Date: Thu, 27 May 2021 12:41:41 +0200
Subject: [PATCH] Ignore the device version for Atari vcs controllers

At least on bluetooth the guid user the version reported by the
bluetooth device. Which for Atari vcs controllers is the firmware
version. However the mapping will stay the same regardless of firmware
version, so ignore the version entirely to avoid needing a new mapping
entry for each firmware version.

Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
---
 src/joystick/linux/SDL_sysjoystick.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/joystick/linux/SDL_sysjoystick.c b/src/joystick/linux/SDL_sysjoystick.c
index bb51fa68aa..25146d10a4 100644
--- a/src/joystick/linux/SDL_sysjoystick.c
+++ b/src/joystick/linux/SDL_sysjoystick.c
@@ -127,6 +127,14 @@ FixupDeviceInfoForMapping(int fd, struct input_id *inpid)
             inpid->version = 0x0902;
         }
     }
+
+ /* For Atari vcs modern and classic controllers have the version reflecting
+ * firmware version, but the mapping stays stable so ignore
+ * version information */
+ if (inpid->vendor == 0x3250
+ && (inpid->product == 0x1001 || inpid->product == 0x1002)) {
+ inpid->version = 0;
+ }
 }
 
 #ifdef SDL_JOYSTICK_HIDAPI

```
