From a4198f42020125dce049cccac82a9c689f79ebe8 Mon Sep 17 00:00:00 2001 From: Chris Mayo Date: Sun, 1 Mar 2015 19:03:42 +0000 Subject: [PATCH] mouse: Increase number of buttons supported from 5 to 7 Full support for mouse with wheel and thumb buttons N.B. 5 buttons was still hardcoded in ButtonTranslator.cpp --- system/keymaps/mouse.xml | 2 +- xbmc/input/ButtonTranslator.cpp | 3 ++- xbmc/input/MouseStat.cpp | 4 ++++ xbmc/input/MouseStat.h | 18 ++++++++++++++++-- 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/system/keymaps/mouse.xml b/system/keymaps/mouse.xml index ea7a993cbd98d..d83fab099010f 100644 --- a/system/keymaps/mouse.xml +++ b/system/keymaps/mouse.xml @@ -4,7 +4,7 @@ - + diff --git a/xbmc/input/ButtonTranslator.cpp b/xbmc/input/ButtonTranslator.cpp index 44f2374cfafec..88b52f219a1ae 100644 --- a/xbmc/input/ButtonTranslator.cpp +++ b/xbmc/input/ButtonTranslator.cpp @@ -25,6 +25,7 @@ #include "utils/URIUtils.h" #include "input/Key.h" #include "guilib/WindowIDs.h" +#include "input/MouseStat.h" #include "input/XBMC_keysym.h" #include "input/XBMC_keytable.h" #include "filesystem/File.h" @@ -1620,7 +1621,7 @@ uint32_t CButtonTranslator::TranslateMouseCommand(TiXmlElement *pButton) else { int id = 0; - if ((pButton->QueryIntAttribute("id", &id) == TIXML_SUCCESS) && id>=0 && id<=4) + if ((pButton->QueryIntAttribute("id", &id) == TIXML_SUCCESS) && id>=0 && id