X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_input_devices.c;h=493bcd8b2c368cc93c61b8274fd2df40647312fe;hb=ce2e5aba172eb85cda2b4f047bdcf9f54d019fd7;hp=a53a81b1abc16f12c916e276ebc8fb867f468982;hpb=5bd25a50a0034f0d2f6181811ebfd7d348984156;p=freeglut diff --git a/src/freeglut_input_devices.c b/src/freeglut_input_devices.c index a53a81b..493bcd8 100755 --- a/src/freeglut_input_devices.c +++ b/src/freeglut_input_devices.c @@ -68,32 +68,32 @@ typedef struct { #define DIAL_NUM_VALUATORS 8 - /* dial parser state machine states */ -#define DIAL_NEW -1 +/* dial parser state machine states */ +#define DIAL_NEW (-1) #define DIAL_WHICH_DEVICE 0 #define DIAL_VALUE_HIGH 1 #define DIAL_VALUE_LOW 2 - /* dial/button box commands */ +/* dial/button box commands */ #define DIAL_INITIALIZE 0x20 #define DIAL_SET_LEDS 0x75 #define DIAL_SET_TEXT 0x61 #define DIAL_SET_AUTO_DIALS 0x50 #define DIAL_SET_AUTO_DELTA_DIALS 0x51 -#define DIAL_SET_FILTER 0x53 +#define DIAL_SET_FILTER 0x53 #define DIAL_SET_BUTTONS_MOM_TYPE 0x71 #define DIAL_SET_AUTO_MOM_BUTTONS 0x73 -#define DIAL_SET_ALL_LEDS 0x4b -#define DIAL_CLEAR_ALL_LEDS 0x4c +#define DIAL_SET_ALL_LEDS 0x4b +#define DIAL_CLEAR_ALL_LEDS 0x4c - /* dial/button box replies and events */ +/* dial/button box replies and events */ #define DIAL_INITIALIZED 0x20 #define DIAL_BASE 0x30 #define DIAL_DELTA_BASE 0x40 #define DIAL_PRESS_BASE 0xc0 #define DIAL_RELEASE_BASE 0xe0 - /* macros to determine reply type */ +/* macros to determine reply type */ #define IS_DIAL_EVENT(ch) (((ch)>=DIAL_BASE)&&((ch)=DIAL_PRESS_BASE)&&((ch)=DIAL_RELEASE_BASE)&&((ch)termio_save); memset(&termio, 0, sizeof(termio)); - cfmakeraw(&termio); termio.c_cflag = CS8 | CREAD | HUPCL ; termio.c_iflag = IGNPAR | IGNBRK ; termio.c_cc[VTIME] = 0; /* inter-character timer */