Add 32 button support to sdl and win as well.

The world isn't x11 (much as I'd like it to be)
This commit is contained in:
Bill Currie 2012-07-02 16:49:23 +09:00
parent 7cd8806ec0
commit 8fa92bf206
2 changed files with 8 additions and 8 deletions

View file

@ -530,15 +530,15 @@ IN_LL_ProcessEvents (void)
case SDL_MOUSEBUTTONDOWN:
case SDL_MOUSEBUTTONUP:
but = event.button.button;
if ((unsigned) but > 32)
break;
if (but == 2)
but = 3;
else if (but == 3)
but = 2;
switch (but) {
case 1:
case 2:
case 3:
default:
Key_Event (QFM_BUTTON1 + but - 1, 0,
event.type == SDL_MOUSEBUTTONDOWN);
break;

View file

@ -59,9 +59,9 @@ extern qboolean win_canalttab;
extern DEVMODE win_gdevmode;
// mouse local variables
static unsigned int uiWheelMessage;
static int mouse_buttons;
static int mouse_oldbuttonstate;
static unsigned uiWheelMessage;
static unsigned mouse_buttons;
static unsigned mouse_oldbuttonstate;
static POINT current_pos;
static float mx_accum, my_accum;
static qboolean mouseinitialized;
@ -317,7 +317,7 @@ IN_StartupMouse (void)
}
}
mouse_buttons = 3;
mouse_buttons = 32;
// if a fullscreen video mode was set before the mouse was initialized,
// set the mouse state appropriately
@ -383,7 +383,7 @@ IN_LL_Shutdown (void)
}
static void
IN_MouseEvent (int mstate)
IN_MouseEvent (unsigned mstate)
{
int i;