   Direct Input xy absolute mode values messed up
  Whenever my DIDEVICEOBJECTDATA.dwOfs is DIMOFS_X or DIMOFS_Y, the dwData is always some really random number off the screen.EDIT::I just noticed that it is always the same number I get from the dwData variable: -2147483648.[Edited by - CrazyCamel on December 11, 2005 11:05:58 AM]
  Here's some code:Initializing:DirectInput8Create(hInstance,DIRECTINPUT_VERSION,IID_IDirectInput8,(void**)&didevice,0);didevice->CreateDevice(GUID_SysKeyboard,&keyboard,0);didevice->CreateDevice(GUID_SysMouse,&mouse,0);HANDLE mouseEvent,keyboardEvent;DIPROPDWORD dipdw;keyboard->SetDataFormat(&c_dfDIKeyboard);keyboard->SetCooperativeLevel(hwnd,DISCL_NONEXCLUSIVE | DISCL_FOREGROUND);keyboardEvent=CreateEvent(0,0,0,0);keyboard->SetEventNotification(keyboardEvent);    dipdw.diph.dwSize=sizeof(DIPROPDWORD);    dipdw.diph.dwHeaderSize=sizeof(DIPROPHEADER);    dipdw.diph.dwObj=0;    dipdw.diph.dwHow=DIPH_DEVICE;    dipdw.dwData=16;keyboard->SetProperty(DIPROP_BUFFERSIZE,&dipdw.diph);keyboard->Acquire();mouse->SetDataFormat(&c_dfDIMouse);mouse->SetCooperativeLevel(hwnd,DISCL_EXCLUSIVE | DISCL_FOREGROUND);mouseEvent=CreateEvent(0,0,0,0);mouse->SetEventNotification(mouseEvent);    dipdw.diph.dwSize=sizeof(DIPROPDWORD);    dipdw.diph.dwHeaderSize=sizeof(DIPROPHEADER);    dipdw.diph.dwObj=0;    dipdw.diph.dwHow=DIPH_DEVICE;    dipdw.dwData=16;mouse->SetProperty(DIPROP_BUFFERSIZE,&dipdw.diph);    dipdw.diph.dwSize=sizeof(DIPROPDWORD);    dipdw.diph.dwHeaderSize=sizeof(DIPROPHEADER);    dipdw.diph.dwObj=0;    dipdw.diph.dwHow=DIPH_DEVICE;    dipdw.dwData=DIPROPAXISMODE_ABS;mouse->SetProperty(DIPROP_AXISMODE,&dipdw.diph);mouse->Acquire();Update Function (called every frame)int UserInput::Update(std::vector<DIDEVICEOBJECTDATA>* keyboardOD,  std::vector<DIDEVICEOBJECTDATA>* mouseOD)  {DIDEVICEOBJECTDATA od[16];DWORD elements=16;keyboard->GetDeviceData(sizeof(DIDEVICEOBJECTDATA),od,&elements,0);for(int i=0;i<(int)elements;i++)  {keyboardOD->push_back(od);}elements=16;mouse->GetDeviceData(sizeof(DIDEVICEOBJECTDATA),od,&elements,0);for(int i=0;i<(int)elements;i++)  {mouseOD->push_back(od);}return 0;}And the previous edit was incorrect; but it usually is some long number like that, and frequently that. It might have something to do with setting the axis mode as absolute, as when I comment that part out, I get the correct relative movement. I suppose I could use relative, but I'd like to know why absolute isn't working.   