diff --git a/polymer/build/src/winlayer.c b/polymer/build/src/winlayer.c index 43a442a72..611739d17 100644 --- a/polymer/build/src/winlayer.c +++ b/polymer/build/src/winlayer.c @@ -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; } diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 4eee7830b..376bd9181 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -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) diff --git a/polymer/eduke32/source/jmact/mouse.h b/polymer/eduke32/source/jmact/mouse.h index 57e376db3..7eb71aa61 100644 --- a/polymer/eduke32/source/jmact/mouse.h +++ b/polymer/eduke32/source/jmact/mouse.h @@ -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 ) diff --git a/polymer/eduke32/source/menus.c b/polymer/eduke32/source/menus.c index 81754ddd4..18826e950 100644 --- a/polymer/eduke32/source/menus.c +++ b/polymer/eduke32/source/menus.c @@ -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;