XNA Creators Club Online
Page 1 of 1 (1 items)
Sort Posts: Previous Next

DirectInput and SetProperty Problem!

Last post 26/05/2009 17:08 by SpookyCat. 0 replies.
  • 26/05/2009 17:08

    DirectInput and SetProperty Problem!

    Hi There

    Iam using DirectInput to read my spacenavigator but Iam having a problem with DIPROP_APPDATA, I use it to define an axis number and all seems to work but when I use GetProperty to check the value I set it returns -1, all other joysticks etc return the value I just set. Both SetProperty and GetProperty return DI_OK. I asked in the makers of the SpaceNavigator forum and they say its a DirectInput problem. Has anyone had any experience with this?

    Thanks
    Chris

    DIPROPPOINTER diptr; 
       diptr.diph.dwSize       = sizeof(DIPROPPOINTER); 
       diptr.diph.dwHeaderSize = sizeof(DIPROPHEADER); 
       diptr.diph.dwHow        = DIPH_BYID; 
       diptr.diph.dwObj        = lpddoi->dwType; 
       diptr.uData             = aoff + 1; 
     
       HRESULT hr = dev->mDevice->SetProperty(DIPROP_APPDATA, &diptr.diph); 
     
    // Read it back 
    DIPROPPOINTER diptr1; 
       diptr1.diph.dwSize       = sizeof(DIPROPPOINTER); 
       diptr1.diph.dwHeaderSize = sizeof(DIPROPHEADER); 
       diptr1.diph.dwHow        = DIPH_BYID; 
       diptr1.diph.dwObj        = lpddoi->dwType; 
     
       hr = dev->mDevice->GetProperty(DIPROP_APPDATA, &diptr1.diph);  
Page 1 of 1 (1 items) Previous Next
var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
DCSIMG