Merge pull request #96 from Boomslangnz/master
Add vibration values to shared page
This commit is contained in:
commit
481002f13b
@ -169,6 +169,8 @@ int* ffbOffset = &secData[2];
|
|||||||
int* ffbOffset2 = &secData[3];
|
int* ffbOffset2 = &secData[3];
|
||||||
int* ffbOffset3 = &secData[4];
|
int* ffbOffset3 = &secData[4];
|
||||||
int* ffbOffset4 = &secData[5];
|
int* ffbOffset4 = &secData[5];
|
||||||
|
int* ffbOffset5 = &secData[6]; //Vibration Left Motor
|
||||||
|
int* ffbOffset6 = &secData[7]; //Vibration Right Motor
|
||||||
|
|
||||||
static bool IsCommHooked(HANDLE hFile);
|
static bool IsCommHooked(HANDLE hFile);
|
||||||
|
|
||||||
|
@ -60,6 +60,8 @@ extern int* ffbOffset;
|
|||||||
extern int* ffbOffset2;
|
extern int* ffbOffset2;
|
||||||
extern int* ffbOffset3;
|
extern int* ffbOffset3;
|
||||||
extern int* ffbOffset4;
|
extern int* ffbOffset4;
|
||||||
|
extern int* ffbOffset5;
|
||||||
|
extern int* ffbOffset6;
|
||||||
|
|
||||||
DWORD WINAPI XInputGetState
|
DWORD WINAPI XInputGetState
|
||||||
(
|
(
|
||||||
@ -206,6 +208,10 @@ DWORD WINAPI XInputSetState
|
|||||||
// We're receiving as XInput [0 ~ 65535], need to be [0 ~ 255] !!
|
// We're receiving as XInput [0 ~ 65535], need to be [0 ~ 255] !!
|
||||||
int leftVal = iround(((float)pVibration->wLeftMotorSpeed / 65535) * 255);
|
int leftVal = iround(((float)pVibration->wLeftMotorSpeed / 65535) * 255);
|
||||||
int rightVal = iround(((float)pVibration->wRightMotorSpeed / 65535) * 255);
|
int rightVal = iround(((float)pVibration->wRightMotorSpeed / 65535) * 255);
|
||||||
|
|
||||||
|
*ffbOffset5 = leftVal;
|
||||||
|
*ffbOffset6 = rightVal;
|
||||||
|
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user