#!/bin/bash
# This file is part of Xpra.
# Copyright (C) 2017 Antoine Martin <antoine@devloop.org.uk>
# Xpra is released under the terms of the GNU GPL v2, or, at your option, any
# later version. See the file COPYING for details.

INPUT=`dirname ${DEVPATH}`
#ie: INPUT=/devices/virtual/input/input87
VERSION=`cat /sys/${INPUT}/id/version`

#convert hex string to a decimal value
echo $((0x${VERSION}))
