Skip to content

Commit

Permalink
Add X1 and X2 button support to mouse test
Browse files Browse the repository at this point in the history
  • Loading branch information
IOBYTE authored and flibitijibibo committed Mar 4, 2022
1 parent 2f7b885 commit 13756b5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/testmouse.c
Expand Up @@ -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:
Expand All @@ -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) {
Expand Down

0 comments on commit 13756b5

Please sign in to comment.