From 3c6bc765c60932c90ca58b3ba89727f5d90560d0 Mon Sep 17 00:00:00 2001 From: Amaryllis Kulla Date: Sun, 30 Jan 2022 12:23:20 +0100 Subject: [PATCH] EThread: Map mouse buttons 8,9 onto X1,X2 This makes the thumb button on my mouse usable under Linux, still have to check what button code they map to under Windows. --- src/eventthread.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/eventthread.cpp b/src/eventthread.cpp index ed95cf9..c0d6642 100644 --- a/src/eventthread.cpp +++ b/src/eventthread.cpp @@ -215,6 +215,9 @@ void EventThread::process(RGSSThreadData &rtData) { case SDL_MOUSEBUTTONDOWN : case SDL_MOUSEBUTTONUP : + if (event.button.button == 8 || event.button.button == 9) + event.button.button -= (8 - SDL_BUTTON_X1); + case SDL_MOUSEMOTION : if (event.button.which == SDL_TOUCH_MOUSEID) continue;