mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-20 18:52:43 +00:00
The mouse wheel was backwards on Win32... I think this fixes that.
git-svn-id: https://svn.eduke32.com/eduke32@478 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
4c1a6e6ce1
commit
ef81aee7be
4 changed files with 19 additions and 19 deletions
|
@ -1399,14 +1399,14 @@ static void ProcessInputDevices(void)
|
|||
mousey += (short)didod[i].dwData; break;
|
||||
case DIMOFS_Z:
|
||||
if ((int)didod[i].dwData > 0) { // wheel up
|
||||
if (mousewheel[1] > 0 && mousepresscallback) mousepresscallback(6,0);
|
||||
mousewheel[1] = t;
|
||||
mouseb |= 32; if (mousepresscallback) mousepresscallback(6, 1);
|
||||
if (mousewheel[0] > 0 && mousepresscallback) mousepresscallback(5,0);
|
||||
mousewheel[0] = t;
|
||||
mouseb |= 16; if (mousepresscallback) mousepresscallback(5, 1);
|
||||
}
|
||||
else if ((int)didod[i].dwData < 0) { // wheel down
|
||||
if (mousewheel[1] > 0 && mousepresscallback) mousepresscallback(6,0);
|
||||
mousewheel[0] = t;
|
||||
mouseb |= 16; if (mousepresscallback) mousepresscallback(5, 1);
|
||||
mousewheel[1] = t;
|
||||
mouseb |= 32; if (mousepresscallback) mousepresscallback(6, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -2322,10 +2322,10 @@ static void Keys3d(void)
|
|||
else
|
||||
repeatcounty = 0;
|
||||
}
|
||||
if (bstatus&16) // -
|
||||
if (bstatus&32) // -
|
||||
{
|
||||
mouseb &= ~16;
|
||||
bstatus &= ~16;
|
||||
mouseb &= ~32;
|
||||
bstatus &= ~32;
|
||||
if ((keystatus[0x38]|keystatus[0xb8]) > 0) //ALT
|
||||
{
|
||||
if ((keystatus[0x1d]|keystatus[0x9d]) > 0) //CTRL
|
||||
|
@ -2410,10 +2410,10 @@ static void Keys3d(void)
|
|||
asksave = 1;
|
||||
}
|
||||
}
|
||||
if (bstatus&32) // +
|
||||
if (bstatus&16) // +
|
||||
{
|
||||
mouseb &= ~32;
|
||||
bstatus &= ~32;
|
||||
mouseb &= ~16;
|
||||
bstatus &= ~16;
|
||||
if ((keystatus[0x38]|keystatus[0xb8]) > 0) //ALT
|
||||
{
|
||||
if ((keystatus[0x1d]|keystatus[0x9d]) > 0) //CTRL
|
||||
|
@ -2502,7 +2502,7 @@ static void Keys3d(void)
|
|||
|
||||
if ((keystatus[KEYSC_DASH]|keystatus[KEYSC_EQUAL]|((bstatus&(16|32)) && !(bstatus&2))) > 0) // mousewheel, -, and +, cycle picnum
|
||||
{
|
||||
j = i = (keystatus[KEYSC_EQUAL]|(bstatus&32))?1:-1;
|
||||
j = i = (keystatus[KEYSC_EQUAL]|(bstatus&16))?1:-1;
|
||||
switch (searchstat)
|
||||
{
|
||||
case 0:
|
||||
|
@ -2774,7 +2774,7 @@ static void Keys3d(void)
|
|||
else
|
||||
updownunits = 1024;
|
||||
|
||||
if ((keystatus[0xc9] > 0) || ((bstatus&2) && (bstatus&32))) // PGUP
|
||||
if ((keystatus[0xc9] > 0) || ((bstatus&2) && (bstatus&16))) // PGUP
|
||||
{
|
||||
k = 0;
|
||||
if (highlightsectorcnt >= 0)
|
||||
|
@ -2910,7 +2910,7 @@ static void Keys3d(void)
|
|||
keystatus[0xc9] = 0;
|
||||
mouseb &= ~32;
|
||||
}
|
||||
if ((keystatus[0xd1] > 0) || ((bstatus&2) && (bstatus&16))) // PGDN
|
||||
if ((keystatus[0xd1] > 0) || ((bstatus&2) && (bstatus&32))) // PGDN
|
||||
{
|
||||
k = 0;
|
||||
if (highlightsectorcnt >= 0)
|
||||
|
|
|
@ -35,8 +35,8 @@ extern "C" {
|
|||
#define RIGHT_MOUSE 2
|
||||
#define MIDDLE_MOUSE 4
|
||||
#define THUMB_MOUSE 8
|
||||
#define WHEELDOWN_MOUSE 16
|
||||
#define WHEELUP_MOUSE 32
|
||||
#define WHEELUP_MOUSE 16
|
||||
#define WHEELDOWN_MOUSE 32
|
||||
#define LEFT_MOUSE_PRESSED( button ) ( ( ( button ) & LEFT_MOUSE ) != 0 )
|
||||
#define RIGHT_MOUSE_PRESSED( button ) ( ( ( button ) & RIGHT_MOUSE ) != 0 )
|
||||
#define MIDDLE_MOUSE_PRESSED( button ) ( ( ( button ) & MIDDLE_MOUSE ) != 0 )
|
||||
|
|
|
@ -43,7 +43,7 @@ static int changesmade, newvidmode, curvidmode, newfullscreen;
|
|||
static int vidsets[16] = { -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 };
|
||||
static int curvidset, newvidset = 0;
|
||||
|
||||
static char *mousebuttonnames[] = { "Left", "Right", "Middle", "Thumb", "Wheel Down", "Wheel Up" };
|
||||
static char *mousebuttonnames[] = { "Left", "Right", "Middle", "Thumb", "Wheel Up", "Wheel Down" };
|
||||
|
||||
extern int gotvote[MAXPLAYERS], votes[MAXPLAYERS], voting;
|
||||
|
||||
|
@ -86,8 +86,8 @@ void savetemp(char *fn,long daptr,long dasiz)
|
|||
|
||||
#define LMB (buttonstat&1)
|
||||
#define RMB (buttonstat&2)
|
||||
#define WHEELDOWN (buttonstat&16)
|
||||
#define WHEELUP (buttonstat&32)
|
||||
#define WHEELUP (buttonstat&16)
|
||||
#define WHEELDOWN (buttonstat&32)
|
||||
|
||||
ControlInfo minfo;
|
||||
|
||||
|
|
Loading…
Reference in a new issue