2 * Acess GUI (AxWin) Version 2
3 * By John Hodge (thePowersGang)
16 giMouseFD = open(gsMouseDevice, 3);
20 num_value.Value = giScreenWidth;
21 ioctl(giMouseFD, 6, &num_value);
24 num_value.Value = giScreenHeight;
25 ioctl(giMouseFD, 6, &num_value);
30 void Input_FillSelect(int *nfds, fd_set *set)
32 if(*nfds < giTerminalFD) *nfds = giTerminalFD;
33 if(*nfds < giMouseFD) *nfds = giMouseFD;
34 FD_SET(giTerminalFD, set);
35 FD_SET(giMouseFD, set);
38 void Input_HandleSelect(fd_set *set)
40 if(FD_ISSET(giTerminalFD, set))
43 if( read(giTerminalFD, &codepoint, sizeof(codepoint)) != sizeof(codepoint) )
47 // TODO: pass on to message handler
48 _SysDebug("Keypress 0x%x", codepoint);
51 if(FD_ISSET(giMouseFD, set))
54 uint16_t NAxies, NButtons;
56 int16_t MinValue, MaxValue;
63 _SysDebug("Cursor event");
65 seek(giMouseFD, 0, SEEK_SET);
66 if( read(giMouseFD, &mouseinfo, sizeof(mouseinfo)) != sizeof(mouseinfo) )
68 // Not a 3 button mouse, oops
73 // Video_SetCursorPos( mouseinfo.Axies[0], mouseinfo.Axies[1] );
74 _SysDebug("Cursor to %i,%i\n", mouseinfo.Axies[0], mouseinfo.Axies[1]);