DxInput probleme bim setzten der Joystick eigenschaften
-
Ich möchte einfach nur die Properties setzen:
der Fehler tritt erst auf beim Blauen Pfeil.Warum ist das erste mal kein problem dann aber??
hilfe wäre toll!!Ach ja der errorstring lautet: ERROR BUSY & DIERR ACQUIRED
if( pDeviceInstance->dwType & DIDFT_AXIS ) { //Achsenskalierung setzen DIPROPRANGE diprg; diprg.diph.dwSize = sizeof(DIPROPRANGE); diprg.diph.dwHeaderSize = sizeof(DIPROPHEADER); diprg.diph.dwHow = DIPH_DEVICE; diprg.diph.dwObj = 0; // Specify the enumerated axis diprg.lMin = -1000; diprg.lMax = +1000; // Set the range for the axis if( FAILED(h = sDeviceInfo->pDevices[sDeviceInfo->AnzahlDevices-1]->SetProperty( DIPROP_RANGE, &diprg.diph ) ) ) {MessageBox(NULL,"Fehler bei DxInput::Joystickachsenskalierung",DXGetErrorString9(h),MB_OK); return DIENUM_STOP;} DIPROPDWORD AchsenMode; AchsenMode.diph.dwSize = sizeof(DIPROPDWORD); AchsenMode.diph.dwHeaderSize = sizeof(DIPROPHEADER); AchsenMode.diph.dwHow = DIPH_DEVICE; AchsenMode.diph.dwObj = 0; // Specify the enumerated axis AchsenMode.dwData = DIPROPAXISMODE_REL; // Set the range for the axis :arrow: if( FAILED( h = sDeviceInfo->pDevices[sDeviceInfo->AnzahlDevices-1]->SetProperty( DIPROP_AXISMODE, &AchsenMode.diph ) ) ) {MessageBox(NULL,"Fehler bei DxInput::Joystick AchsenMode",DXGetErrorString9(h),MB_OK); return DIENUM_STOP;}danke muli
-
Für alle die es interessiert.
Man darf das Device nicht schon mit ->acquire(); aktivieren sonst geht es nicht mehr.
ich hoffe ihr habt eure grauen Zellen nicht schon mit dem Thema überanstrengt.
nichts für ungut!
euer muli