if(FD_ISSET(giMouseFD, set))
{
struct sMouseInfo {
- uint16_t NAxies, NButtons;
+ uint16_t NAxies;
+ uint16_t NButtons;
struct sMouseAxis {
- int16_t MinValue, MaxValue;
+ int16_t MinValue;
+ int16_t MaxValue;
int16_t CurValue;
uint16_t CursorPos;
} Axies[2];
uint8_t Buttons[3];
} mouseinfo;
- _SysDebug("Cursor event");
-
- seek(giMouseFD, 0, SEEK_SET);
+ seek(giMouseFD, 0, SEEK_SET);
if( read(giMouseFD, &mouseinfo, sizeof(mouseinfo)) != sizeof(mouseinfo) )
{
// Not a 3 button mouse, oops
return ;
}
-
+
+// _SysDebug("sizeof(uint16_t) = %i, sizeof(int16_t) = %i",
+// sizeof(uint16_t), sizeof(int16_t));
+// _SysDebug("NAxies=%i,NButtons=%i", mouseinfo.NAxies, mouseinfo.NButtons);
+// _SysDebug("offsetof(Axies[0].MinValue) = %i", offsetof(struct sMouseInfo, Axies[0].MinValue));
+// _SysDebug("[0] = {MinValue=%i,MaxValue=%i,CurValue=%i}",
+// mouseinfo.Axies[0].MinValue, mouseinfo.Axies[0].MaxValue,
+// mouseinfo.Axies[0].CurValue
+// );
// Handle movement
// Video_SetCursorPos( mouseinfo.Axies[0], mouseinfo.Axies[1] );
- _SysDebug("Cursor to %i,%i\n", mouseinfo.Axies[0].CursorPos, mouseinfo.Axies[1].CursorPos);
+ _SysDebug("Cursor to %i,%i", mouseinfo.Axies[0].CursorPos, mouseinfo.Axies[1].CursorPos);
}
}
#FILES := $(addprefix $(DISTROOT)/,$(FILES))
.PHONY: all clean
-.PHONY: $(DIRS) $(FILES)
+.PHONY: $(DIRS) $(FILES) DISTROOT
-install: $(DIRS) $(FILES)
+install: DISTROOT $(DIRS) $(FILES)
clean:
+DISTROOT:
+ $(xMKDIR) $(DISTROOT); true
+
$(DIRS):
$(xMKDIR) $(DISTROOT)/$@; true