1
0
mirror of synced 2024-11-27 16:10:52 +01:00

Demul Fixes

This commit is contained in:
Boomslangnz 2023-03-09 20:16:34 +13:00
parent 588a36ada0
commit 596e714064
6 changed files with 24 additions and 24 deletions

View File

@ -146,7 +146,7 @@ void ATVTrackInputsEnabled(Helpers* helpers)
while (SDL_WaitEvent(&e) != 0)
{
if ((e.type == SDL_JOYAXISMOTION) & (ShowAxisForSetup == 0))
if ((e.type == SDL_JOYAXISMOTION) && (ShowAxisForSetup == 0))
{
if (e.jaxis.which == joystick_index1)
{
@ -164,7 +164,7 @@ void ATVTrackInputsEnabled(Helpers* helpers)
e.jaxis.value = e.jaxis.value + WHEEL_DEAD_ZONE;
SteeringValue = (127 + (e.jaxis.value - WHEEL_DEAD_ZONE) / 255);
}
else if ((e.jaxis.value < WHEEL_DEAD_ZONE) & (e.jaxis.value > -WHEEL_DEAD_ZONE))
else if ((e.jaxis.value < WHEEL_DEAD_ZONE) && (e.jaxis.value > -WHEEL_DEAD_ZONE))
{
SteeringValue = 0x7F;
}
@ -187,7 +187,7 @@ void ATVTrackInputsEnabled(Helpers* helpers)
e.jaxis.value = e.jaxis.value - ACCL_DEAD_ZONE;
BrakeValue = ((e.jaxis.value + ACCL_DEAD_ZONE) / 128);
}
else if ((e.jaxis.value < ACCL_DEAD_ZONE) & (e.jaxis.value > -ACCL_DEAD_ZONE))
else if ((e.jaxis.value < ACCL_DEAD_ZONE) && (e.jaxis.value > -ACCL_DEAD_ZONE))
{
helpers->WriteByte(AcclAddress, 0x00, false);
BrakeValue = 0x00;
@ -274,7 +274,7 @@ void ATVTrackInputsEnabled(Helpers* helpers)
e.jaxis.value = e.jaxis.value + ACCL_DEAD_ZONE;
BrakeValue = ((-e.jaxis.value + ACCL_DEAD_ZONE) / 128);
}
else if ((e.jaxis.value < ACCL_DEAD_ZONE) & (e.jaxis.value > -ACCL_DEAD_ZONE))
else if ((e.jaxis.value < ACCL_DEAD_ZONE) && (e.jaxis.value > -ACCL_DEAD_ZONE))
{
helpers->WriteByte(AcclAddress, 0xFF, false);
BrakeValue = 0x00;

View File

@ -140,7 +140,7 @@ void FasterThanSpeedInputsEnabled(Helpers* helpers)
while (SDL_WaitEvent(&e) != 0)
{
if ((e.type == SDL_JOYAXISMOTION) & (ShowAxisForSetup == 0))
if ((e.type == SDL_JOYAXISMOTION) && (ShowAxisForSetup == 0))
{
if (e.jaxis.which == joystick_index1)
{
@ -158,7 +158,7 @@ void FasterThanSpeedInputsEnabled(Helpers* helpers)
e.jaxis.value = e.jaxis.value + WHEEL_DEAD_ZONE;
helpers->WriteByte(SteeringAddress, (127 + (e.jaxis.value - WHEEL_DEAD_ZONE) / 255), false);
}
else if ((e.jaxis.value < WHEEL_DEAD_ZONE) & (e.jaxis.value > -WHEEL_DEAD_ZONE))
else if ((e.jaxis.value < WHEEL_DEAD_ZONE) && (e.jaxis.value > -WHEEL_DEAD_ZONE))
{
helpers->WriteByte(SteeringAddress, 0x7F, false);
}
@ -179,7 +179,7 @@ void FasterThanSpeedInputsEnabled(Helpers* helpers)
e.jaxis.value = e.jaxis.value - ACCL_DEAD_ZONE;
helpers->WriteByte(BrakeAddress, ((e.jaxis.value + ACCL_DEAD_ZONE) / 128), false);
}
else if ((e.jaxis.value < ACCL_DEAD_ZONE) & (e.jaxis.value > -ACCL_DEAD_ZONE))
else if ((e.jaxis.value < ACCL_DEAD_ZONE) && (e.jaxis.value > -ACCL_DEAD_ZONE))
{
helpers->WriteByte(AcclAddress, 0x00, false);
helpers->WriteByte(BrakeAddress, 0x00, false);
@ -232,7 +232,7 @@ void FasterThanSpeedInputsEnabled(Helpers* helpers)
e.jaxis.value = e.jaxis.value + ACCL_DEAD_ZONE;
helpers->WriteByte(BrakeAddress, ((-e.jaxis.value + ACCL_DEAD_ZONE) / 128), false);
}
else if ((e.jaxis.value < ACCL_DEAD_ZONE) & (e.jaxis.value > -ACCL_DEAD_ZONE))
else if ((e.jaxis.value < ACCL_DEAD_ZONE) && (e.jaxis.value > -ACCL_DEAD_ZONE))
{
helpers->WriteByte(AcclAddress, 0xFF, false);
helpers->WriteByte(BrakeAddress, 0xFF, false);

View File

@ -152,7 +152,7 @@ void InitialDInputsEnabled(Helpers* helpers)
while (SDL_WaitEvent(&e) != 0)
{
if ((e.type == SDL_JOYAXISMOTION) & (ShowAxisForSetup == 0))
if ((e.type == SDL_JOYAXISMOTION) && (ShowAxisForSetup == 0))
{
if (e.jaxis.which == joystick_index1)
{
@ -170,7 +170,7 @@ void InitialDInputsEnabled(Helpers* helpers)
e.jaxis.value = e.jaxis.value + WHEEL_DEAD_ZONE;
helpers->WriteByte(SteeringAddress, (127 + (e.jaxis.value - WHEEL_DEAD_ZONE) / 255), false);
}
else if ((e.jaxis.value < WHEEL_DEAD_ZONE) & (e.jaxis.value > -WHEEL_DEAD_ZONE))
else if ((e.jaxis.value < WHEEL_DEAD_ZONE) && (e.jaxis.value > -WHEEL_DEAD_ZONE))
{
helpers->WriteByte(SteeringAddress, 0x7F, false);
}
@ -191,7 +191,7 @@ void InitialDInputsEnabled(Helpers* helpers)
e.jaxis.value = e.jaxis.value - ACCL_DEAD_ZONE;
helpers->WriteByte(BrakeAddress, ((e.jaxis.value + ACCL_DEAD_ZONE) / 128), false);
}
else if ((e.jaxis.value < ACCL_DEAD_ZONE) & (e.jaxis.value > -ACCL_DEAD_ZONE))
else if ((e.jaxis.value < ACCL_DEAD_ZONE) && (e.jaxis.value > -ACCL_DEAD_ZONE))
{
helpers->WriteByte(AcclAddress, 0x00, false);
helpers->WriteByte(BrakeAddress, 0x00, false);
@ -244,7 +244,7 @@ void InitialDInputsEnabled(Helpers* helpers)
e.jaxis.value = e.jaxis.value + ACCL_DEAD_ZONE;
helpers->WriteByte(BrakeAddress, ((-e.jaxis.value + ACCL_DEAD_ZONE) / 128), false);
}
else if ((e.jaxis.value < ACCL_DEAD_ZONE) & (e.jaxis.value > -ACCL_DEAD_ZONE))
else if ((e.jaxis.value < ACCL_DEAD_ZONE) && (e.jaxis.value > -ACCL_DEAD_ZONE))
{
helpers->WriteByte(AcclAddress, 0xFF, false);
helpers->WriteByte(BrakeAddress, 0xFF, false);

View File

@ -135,7 +135,7 @@ void MaximumSpeedInputsEnabled(Helpers* helpers)
while (SDL_WaitEvent(&e) != 0)
{
if ((e.type == SDL_JOYAXISMOTION) & (ShowAxisForSetup == 0))
if ((e.type == SDL_JOYAXISMOTION) && (ShowAxisForSetup == 0))
{
if (e.jaxis.which == joystick_index1)
{
@ -153,7 +153,7 @@ void MaximumSpeedInputsEnabled(Helpers* helpers)
e.jaxis.value = e.jaxis.value + WHEEL_DEAD_ZONE;
helpers->WriteByte(SteeringAddress, (127 + (e.jaxis.value - WHEEL_DEAD_ZONE) / 255), false);
}
else if ((e.jaxis.value < WHEEL_DEAD_ZONE) & (e.jaxis.value > -WHEEL_DEAD_ZONE))
else if ((e.jaxis.value < WHEEL_DEAD_ZONE) && (e.jaxis.value > -WHEEL_DEAD_ZONE))
{
helpers->WriteByte(SteeringAddress, 0x7F, false);
}
@ -174,7 +174,7 @@ void MaximumSpeedInputsEnabled(Helpers* helpers)
e.jaxis.value = e.jaxis.value - ACCL_DEAD_ZONE;
helpers->WriteByte(BrakeAddress, ((e.jaxis.value + ACCL_DEAD_ZONE) / 128), false);
}
else if ((e.jaxis.value < ACCL_DEAD_ZONE) & (e.jaxis.value > -ACCL_DEAD_ZONE))
else if ((e.jaxis.value < ACCL_DEAD_ZONE) && (e.jaxis.value > -ACCL_DEAD_ZONE))
{
helpers->WriteByte(AcclAddress, 0x00, false);
helpers->WriteByte(BrakeAddress, 0x00, false);
@ -227,7 +227,7 @@ void MaximumSpeedInputsEnabled(Helpers* helpers)
e.jaxis.value = e.jaxis.value + ACCL_DEAD_ZONE;
helpers->WriteByte(BrakeAddress, ((-e.jaxis.value + ACCL_DEAD_ZONE) / 128), false);
}
else if ((e.jaxis.value < ACCL_DEAD_ZONE) & (e.jaxis.value > -ACCL_DEAD_ZONE))
else if ((e.jaxis.value < ACCL_DEAD_ZONE) && (e.jaxis.value > -ACCL_DEAD_ZONE))
{
helpers->WriteByte(AcclAddress, 0xFF, false);
helpers->WriteByte(BrakeAddress, 0xFF, false);

View File

@ -151,7 +151,7 @@ void NascarInputsEnabled(Helpers* helpers)
while (SDL_WaitEvent(&e) != 0)
{
UINT8 shiftupdownreadA = helpers->ReadByte(ShiftUpDownAddress, false);
if ((e.type == SDL_JOYAXISMOTION) & (ShowAxisForSetup == 0))
if ((e.type == SDL_JOYAXISMOTION) && (ShowAxisForSetup == 0))
{
if (e.jaxis.which == joystick_index1)
{
@ -169,7 +169,7 @@ void NascarInputsEnabled(Helpers* helpers)
e.jaxis.value = e.jaxis.value + WHEEL_DEAD_ZONE;
helpers->WriteByte(SteeringAddress, (127 + (e.jaxis.value - WHEEL_DEAD_ZONE) / 255), false);
}
else if ((e.jaxis.value < WHEEL_DEAD_ZONE) & (e.jaxis.value > -WHEEL_DEAD_ZONE))
else if ((e.jaxis.value < WHEEL_DEAD_ZONE) && (e.jaxis.value > -WHEEL_DEAD_ZONE))
{
helpers->WriteByte(SteeringAddress, 0x7F, false);
}
@ -190,7 +190,7 @@ void NascarInputsEnabled(Helpers* helpers)
e.jaxis.value = e.jaxis.value - ACCL_DEAD_ZONE;
helpers->WriteByte(BrakeAddress, ((e.jaxis.value + ACCL_DEAD_ZONE) / 128), false);
}
else if ((e.jaxis.value < ACCL_DEAD_ZONE) & (e.jaxis.value > -ACCL_DEAD_ZONE))
else if ((e.jaxis.value < ACCL_DEAD_ZONE) && (e.jaxis.value > -ACCL_DEAD_ZONE))
{
helpers->WriteByte(AcclAddress, 0x00, false);
helpers->WriteByte(BrakeAddress, 0x00, false);
@ -243,7 +243,7 @@ void NascarInputsEnabled(Helpers* helpers)
e.jaxis.value = e.jaxis.value + ACCL_DEAD_ZONE;
helpers->WriteByte(BrakeAddress, ((-e.jaxis.value + ACCL_DEAD_ZONE) / 128), false);
}
else if ((e.jaxis.value < ACCL_DEAD_ZONE) & (e.jaxis.value > -ACCL_DEAD_ZONE))
else if ((e.jaxis.value < ACCL_DEAD_ZONE) && (e.jaxis.value > -ACCL_DEAD_ZONE))
{
helpers->WriteByte(AcclAddress, 0xFF, false);
helpers->WriteByte(BrakeAddress, 0xFF, false);

View File

@ -138,7 +138,7 @@ void SmashingDriveInputsEnabled(Helpers* helpers)
while (SDL_WaitEvent(&e) != 0)
{
if ((e.type == SDL_JOYAXISMOTION) & (ShowAxisForSetup == 0))
if ((e.type == SDL_JOYAXISMOTION) && (ShowAxisForSetup == 0))
{
if (e.jaxis.which == joystick_index1)
{
@ -156,7 +156,7 @@ void SmashingDriveInputsEnabled(Helpers* helpers)
e.jaxis.value = e.jaxis.value + WHEEL_DEAD_ZONE;
helpers->WriteByte(SteeringAddress, (127 + (e.jaxis.value - WHEEL_DEAD_ZONE) / 255), false);
}
else if ((e.jaxis.value < WHEEL_DEAD_ZONE) & (e.jaxis.value > -WHEEL_DEAD_ZONE))
else if ((e.jaxis.value < WHEEL_DEAD_ZONE) && (e.jaxis.value > -WHEEL_DEAD_ZONE))
{
helpers->WriteByte(SteeringAddress, 0x7F, false);
}
@ -177,7 +177,7 @@ void SmashingDriveInputsEnabled(Helpers* helpers)
e.jaxis.value = e.jaxis.value - ACCL_DEAD_ZONE;
BrakeValue = ((e.jaxis.value + ACCL_DEAD_ZONE) / 128);
}
else if ((e.jaxis.value < ACCL_DEAD_ZONE) & (e.jaxis.value > -ACCL_DEAD_ZONE))
else if ((e.jaxis.value < ACCL_DEAD_ZONE) && (e.jaxis.value > -ACCL_DEAD_ZONE))
{
AcclValue = 0x00;
BrakeValue = 0x00;
@ -298,7 +298,7 @@ void SmashingDriveInputsEnabled(Helpers* helpers)
e.jaxis.value = e.jaxis.value + ACCL_DEAD_ZONE;
BrakeValue = ((-e.jaxis.value + ACCL_DEAD_ZONE) / 128);
}
else if ((e.jaxis.value < ACCL_DEAD_ZONE) & (e.jaxis.value > -ACCL_DEAD_ZONE))
else if ((e.jaxis.value < ACCL_DEAD_ZONE) && (e.jaxis.value > -ACCL_DEAD_ZONE))
{
AcclValue = 0xFF;
BrakeValue = 0xFF;