Changeset 2188 for trunk/src/dinput/oslibinput.cpp
- Timestamp:
- Dec 22, 1999, 12:19:14 AM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/dinput/oslibinput.cpp
r1634 r2188 1 /* $Id: oslibinput.cpp,v 1. 2 1999-11-08 13:50:41 sandervlExp $ */1 /* $Id: oslibinput.cpp,v 1.3 1999-12-21 23:19:14 hugh Exp $ */ 2 2 3 3 #define INCL_WIN … … 30 30 rc = WinSetKeyboardStateTable( HWND_DESKTOP, (PBYTE)&PMKeyState, FALSE ); 31 31 32 if(rc == TRUE && len==256) 32 if(rc == TRUE && len==256) 33 33 { 34 35 36 winkeybuf[i] &= 0x80;//only high bit37 38 34 KeyTranslatePMToWinBuf((BYTE *)&PMKeyState, (BYTE *)&ptr, len); 35 for(int i=0;i<256;i++) { 36 winkeybuf[i] &= 0x80; //only high bit 37 } 38 return TRUE; 39 39 } 40 40 return FALSE; … … 48 48 49 49 rc = WinQueryPointerPos(HWND_DESKTOP, &point); 50 50 51 51 *rx = point.x; 52 52 *ry = ScreenHeight - point.y; 53 53 54 54 *state = 0; 55 if(WinGetKeyState(HWND_DESKTOP, VK_BUTTON1) )55 if(WinGetKeyState(HWND_DESKTOP, VK_BUTTON1) & 0x8000) 56 56 *state |= MK_LBUTTON_W; 57 if(WinGetKeyState(HWND_DESKTOP, VK_BUTTON2) )57 if(WinGetKeyState(HWND_DESKTOP, VK_BUTTON2) & 0x8000) 58 58 *state |= MK_RBUTTON_W; 59 if(WinGetKeyState(HWND_DESKTOP, VK_BUTTON3) )59 if(WinGetKeyState(HWND_DESKTOP, VK_BUTTON3) & 0x8000) 60 60 *state |= MK_MBUTTON_W; 61 if(WinGetKeyState(HWND_DESKTOP, VK_SHIFT) & 0x8000) 62 *state |= MK_SHIFT_W; 63 if(WinGetKeyState(HWND_DESKTOP, VK_CTRL) & 0x8000) 64 *state |= MK_CONTROL_W; 61 65 62 66 return rc; … … 67 71 { 68 72 y = ScreenHeight - y; 69 73 70 74 return WinSetPointerPos(HWND_DESKTOP, x, y); 71 75 }
Note:
See TracChangeset
for help on using the changeset viewer.