From 13756b5c72412fad4dea7f7473f0a713757fa6ac Mon Sep 17 00:00:00 2001 From: IOBYTE Date: Fri, 4 Mar 2022 10:47:25 -0500 Subject: [PATCH] Add X1 and X2 button support to mouse test --- test/testmouse.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/testmouse.c b/test/testmouse.c index 0c9f7ee10..c73adca51 100644 --- a/test/testmouse.c +++ b/test/testmouse.c @@ -100,6 +100,8 @@ loop(void *arg) case SDL_BUTTON_LEFT: active->r = 255; buttons |= SDL_BUTTON_LMASK; break; case SDL_BUTTON_MIDDLE: active->g = 255; buttons |= SDL_BUTTON_MMASK; break; case SDL_BUTTON_RIGHT: active->b = 255; buttons |= SDL_BUTTON_RMASK; break; + case SDL_BUTTON_X1: active->r = 255; active->b = 255; buttons |= SDL_BUTTON_X1MASK; break; + case SDL_BUTTON_X2: active->g = 255; active->b = 255; buttons |= SDL_BUTTON_X2MASK; break; } break; case SDL_MOUSEBUTTONUP: @@ -110,6 +112,8 @@ loop(void *arg) case SDL_BUTTON_LEFT: buttons &= ~SDL_BUTTON_LMASK; break; case SDL_BUTTON_MIDDLE: buttons &= ~SDL_BUTTON_MMASK; break; case SDL_BUTTON_RIGHT: buttons &= ~SDL_BUTTON_RMASK; break; + case SDL_BUTTON_X1: buttons &= ~SDL_BUTTON_X1MASK; break; + case SDL_BUTTON_X2: buttons &= ~SDL_BUTTON_X2MASK; break; } if (buttons == 0) {