Replace code for ShowAxis/Buttons
This commit is contained in:
parent
b18dc40c5a
commit
b0fa1e290b
@ -96,76 +96,23 @@ void ButtonRumble32bit::FFBLoop(EffectConstants *constants, Helpers *helpers, Ef
|
|||||||
SDL_HapticRumbleInit(ControllerHaptic2);
|
SDL_HapticRumbleInit(ControllerHaptic2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ShowButtonNumbersForSetup == 1)
|
if (ShowButtonNumbersForSetup == 1)
|
||||||
{
|
{
|
||||||
if (e.type == SDL_JOYBUTTONDOWN)
|
if (e.type == SDL_JOYBUTTONDOWN)
|
||||||
{
|
{
|
||||||
if (e.jbutton.button == 0)
|
if (e.jaxis.which == joystick_index1 || e.jaxis.which == joystick_index2)
|
||||||
{
|
{
|
||||||
MessageBoxA(NULL, "Button 0 Pressed", "", 0);
|
if (e.jbutton.button >= 0)
|
||||||
}
|
{
|
||||||
else if (e.jbutton.button == 1)
|
char buff[100];
|
||||||
{
|
sprintf_s(buff, "Button %d Pressed", e.jbutton.button);
|
||||||
MessageBoxA(NULL, "Button 1 Pressed", "", 0);
|
MessageBoxA(NULL, buff, "", NULL);
|
||||||
}
|
}
|
||||||
else if (e.jbutton.button == 2)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 2 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 3)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 3 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 4)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 4 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 5)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 5 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 6)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 6 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 7)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 7 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 8)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 8 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 9)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 9 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 10)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 10 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 11)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 11 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 12)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 12 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 13)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 13 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 14)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 14 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 15)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 15 Pressed", "", 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.type == SDL_JOYBUTTONDOWN)
|
if (e.type == SDL_JOYBUTTONDOWN)
|
||||||
{
|
{
|
||||||
if (e.jaxis.which == joystick_index1)
|
if (e.jaxis.which == joystick_index1)
|
||||||
|
@ -96,76 +96,23 @@ void ButtonRumble64bit::FFBLoop(EffectConstants *constants, Helpers *helpers, Ef
|
|||||||
SDL_HapticRumbleInit(ControllerHaptic2);
|
SDL_HapticRumbleInit(ControllerHaptic2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ShowButtonNumbersForSetup == 1)
|
if (ShowButtonNumbersForSetup == 1)
|
||||||
{
|
{
|
||||||
if (e.type == SDL_JOYBUTTONDOWN)
|
if (e.type == SDL_JOYBUTTONDOWN)
|
||||||
{
|
{
|
||||||
if (e.jbutton.button == 0)
|
if (e.jaxis.which == joystick_index1 || e.jaxis.which == joystick_index2)
|
||||||
{
|
{
|
||||||
MessageBoxA(NULL, "Button 0 Pressed", "", 0);
|
if (e.jbutton.button >= 0)
|
||||||
}
|
{
|
||||||
else if (e.jbutton.button == 1)
|
char buff[100];
|
||||||
{
|
sprintf_s(buff, "Button %d Pressed", e.jbutton.button);
|
||||||
MessageBoxA(NULL, "Button 1 Pressed", "", 0);
|
MessageBoxA(NULL, buff, "", NULL);
|
||||||
}
|
}
|
||||||
else if (e.jbutton.button == 2)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 2 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 3)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 3 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 4)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 4 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 5)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 5 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 6)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 6 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 7)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 7 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 8)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 8 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 9)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 9 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 10)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 10 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 11)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 11 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 12)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 12 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 13)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 13 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 14)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 14 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 15)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 15 Pressed", "", 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.type == SDL_JOYBUTTONDOWN)
|
if (e.type == SDL_JOYBUTTONDOWN)
|
||||||
{
|
{
|
||||||
if (e.jaxis.which == joystick_index1)
|
if (e.jaxis.which == joystick_index1)
|
||||||
|
@ -135,76 +135,20 @@ void Daytona3::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTrigg
|
|||||||
myTriggers = triggers;
|
myTriggers = triggers;
|
||||||
myConstants = constants;
|
myConstants = constants;
|
||||||
myHelpers = helpers;
|
myHelpers = helpers;
|
||||||
|
|
||||||
if (ShowButtonNumbersForSetup == 1)
|
if (ShowButtonNumbersForSetup == 1)
|
||||||
{
|
{
|
||||||
if (e.type == SDL_JOYBUTTONDOWN)
|
if (e.type == SDL_JOYBUTTONDOWN)
|
||||||
{
|
{
|
||||||
if (e.jbutton.button == 0)
|
if (e.jbutton.button >= 0)
|
||||||
{
|
{
|
||||||
MessageBoxA(NULL, "Button 0 Pressed", "", 0);
|
char buff[100];
|
||||||
}
|
sprintf_s(buff, "Button %d Pressed", e.jbutton.button);
|
||||||
else if (e.jbutton.button == 1)
|
MessageBoxA(NULL, buff, "", NULL);
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 1 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 2)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 2 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 3)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 3 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 4)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 4 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 5)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 5 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 6)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 6 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 7)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 7 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 8)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 8 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 9)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 9 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 10)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 10 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 11)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 11 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 12)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 12 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 13)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 13 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 14)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 14 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 15)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 15 Pressed", "", 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.type == SDL_JOYBUTTONDOWN)
|
if (e.type == SDL_JOYBUTTONDOWN)
|
||||||
{
|
{
|
||||||
if (ChangeGearsViaPlugin == 1)
|
if (ChangeGearsViaPlugin == 1)
|
||||||
|
@ -16,15 +16,4 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
void FNF::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers)
|
void FNF::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers)
|
||||||
{
|
{
|
||||||
//HMODULE hMod = GetModuleHandleA("dinput8.dll");
|
|
||||||
/*if (hMod)
|
|
||||||
{
|
|
||||||
void* fn = GetProcAddress(hMod, "GetdfDIJoystick");
|
|
||||||
helpers->WriteNop((INT_PTR)fn + 0x5C0C, false);
|
|
||||||
helpers->WriteNop((INT_PTR)fn + 0x5C0D, false);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "fuck", "", 0);
|
|
||||||
} */
|
|
||||||
}
|
}
|
@ -269,76 +269,20 @@ void OutRun2Fake::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTr
|
|||||||
myTriggers = triggers;
|
myTriggers = triggers;
|
||||||
myConstants = constants;
|
myConstants = constants;
|
||||||
myHelpers = helpers;
|
myHelpers = helpers;
|
||||||
|
|
||||||
if (ShowButtonNumbersForSetup == 1)
|
if (ShowButtonNumbersForSetup == 1)
|
||||||
{
|
{
|
||||||
if (e.type == SDL_JOYBUTTONDOWN)
|
if (e.type == SDL_JOYBUTTONDOWN)
|
||||||
{
|
{
|
||||||
if (e.jbutton.button == 0)
|
if (e.jbutton.button >= 0)
|
||||||
{
|
{
|
||||||
MessageBoxA(NULL, "Button 0 Pressed", "", 0);
|
char buff[100];
|
||||||
}
|
sprintf_s(buff, "Button %d Pressed", e.jbutton.button);
|
||||||
else if (e.jbutton.button == 1)
|
MessageBoxA(NULL, buff, "", NULL);
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 1 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 2)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 2 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 3)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 3 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 4)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 4 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 5)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 5 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 6)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 6 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 7)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 7 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 8)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 8 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 9)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 9 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 10)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 10 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 11)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 11 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 12)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 12 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 13)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 13 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 14)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 14 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 15)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 15 Pressed", "", 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.type == SDL_JOYBUTTONDOWN)
|
if (e.type == SDL_JOYBUTTONDOWN)
|
||||||
{
|
{
|
||||||
if (ChangeGearsViaPlugin == 1)
|
if (ChangeGearsViaPlugin == 1)
|
||||||
|
@ -175,76 +175,20 @@ void OutRun2Real::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTr
|
|||||||
myTriggers = triggers;
|
myTriggers = triggers;
|
||||||
myConstants = constants;
|
myConstants = constants;
|
||||||
myHelpers = helpers;
|
myHelpers = helpers;
|
||||||
|
|
||||||
if (ShowButtonNumbersForSetup == 1)
|
if (ShowButtonNumbersForSetup == 1)
|
||||||
{
|
{
|
||||||
if (e.type == SDL_JOYBUTTONDOWN)
|
if (e.type == SDL_JOYBUTTONDOWN)
|
||||||
{
|
{
|
||||||
if (e.jbutton.button == 0)
|
if (e.jbutton.button >= 0)
|
||||||
{
|
{
|
||||||
MessageBoxA(NULL, "Button 0 Pressed", "", 0);
|
char buff[100];
|
||||||
}
|
sprintf_s(buff, "Button %d Pressed", e.jbutton.button);
|
||||||
else if (e.jbutton.button == 1)
|
MessageBoxA(NULL, buff, "", NULL);
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 1 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 2)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 2 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 3)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 3 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 4)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 4 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 5)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 5 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 6)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 6 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 7)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 7 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 8)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 8 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 9)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 9 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 10)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 10 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 11)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 11 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 12)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 12 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 13)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 13 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 14)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 14 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 15)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 15 Pressed", "", 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.type == SDL_JOYBUTTONDOWN)
|
if (e.type == SDL_JOYBUTTONDOWN)
|
||||||
{
|
{
|
||||||
if ((ChangeGearsViaPlugin == 1) && (transmission == 1))
|
if ((ChangeGearsViaPlugin == 1) && (transmission == 1))
|
||||||
|
@ -523,154 +523,26 @@ void RoadFighters3D::FFBLoop(EffectConstants *constants, Helpers *helpers, Effec
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (ShowAxisForSetup == 1)
|
if (ShowAxisForSetup == 1)
|
||||||
{
|
{
|
||||||
if (e.type == SDL_JOYAXISMOTION)
|
if (e.type == SDL_JOYAXISMOTION)
|
||||||
{
|
{
|
||||||
if (e.jaxis.which == joystick_index1)
|
if (e.jaxis.which == joystick_index1)
|
||||||
{
|
{
|
||||||
if (e.jaxis.axis == 0)
|
if (e.jaxis.axis >= 0)
|
||||||
{
|
{
|
||||||
if (e.jaxis.value < -SETUP_DEAD_ZONE)
|
if (e.jaxis.value < -SETUP_DEAD_ZONE)
|
||||||
{
|
{
|
||||||
e.jaxis.value = e.jaxis.value - SETUP_DEAD_ZONE;
|
e.jaxis.value = e.jaxis.value - SETUP_DEAD_ZONE;
|
||||||
MessageBoxA(NULL, "Axis 0 Moved", "", 0);
|
char buff[100];
|
||||||
|
sprintf_s(buff, "Axis %d Moved", e.jaxis.axis);
|
||||||
|
MessageBoxA(NULL, buff, "", NULL);
|
||||||
}
|
}
|
||||||
else if (e.jaxis.value > SETUP_DEAD_ZONE)
|
else if (e.jaxis.value > SETUP_DEAD_ZONE)
|
||||||
{
|
{
|
||||||
e.jaxis.value = e.jaxis.value + SETUP_DEAD_ZONE;
|
char buff[100];
|
||||||
MessageBoxA(NULL, "Axis 0 Moved", "", 0);
|
sprintf_s(buff, "Axis %d Moved", e.jaxis.axis);
|
||||||
}
|
MessageBoxA(NULL, buff, "", NULL);
|
||||||
}
|
|
||||||
else if (e.jaxis.axis == 1)
|
|
||||||
{
|
|
||||||
if (e.jaxis.value < -SETUP_DEAD_ZONE)
|
|
||||||
{
|
|
||||||
e.jaxis.value = e.jaxis.value - SETUP_DEAD_ZONE;
|
|
||||||
MessageBoxA(NULL, "Axis 1 Moved", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jaxis.value > SETUP_DEAD_ZONE)
|
|
||||||
{
|
|
||||||
e.jaxis.value = e.jaxis.value + SETUP_DEAD_ZONE;
|
|
||||||
MessageBoxA(NULL, "Axis 1 Moved", "", 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (e.jaxis.axis == 2)
|
|
||||||
{
|
|
||||||
if (e.jaxis.value < -SETUP_DEAD_ZONE)
|
|
||||||
{
|
|
||||||
e.jaxis.value = e.jaxis.value - SETUP_DEAD_ZONE;
|
|
||||||
MessageBoxA(NULL, "Axis 2 Moved", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jaxis.value > SETUP_DEAD_ZONE)
|
|
||||||
{
|
|
||||||
e.jaxis.value = e.jaxis.value + SETUP_DEAD_ZONE;
|
|
||||||
MessageBoxA(NULL, "Axis 2 Moved", "", 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (e.jaxis.axis == 3)
|
|
||||||
{
|
|
||||||
if (e.jaxis.value < -SETUP_DEAD_ZONE)
|
|
||||||
{
|
|
||||||
e.jaxis.value = e.jaxis.value - SETUP_DEAD_ZONE;
|
|
||||||
MessageBoxA(NULL, "Axis 3 Moved", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jaxis.value > SETUP_DEAD_ZONE)
|
|
||||||
{
|
|
||||||
e.jaxis.value = e.jaxis.value + SETUP_DEAD_ZONE;
|
|
||||||
MessageBoxA(NULL, "Axis 3 Moved", "", 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (e.jaxis.axis == 4)
|
|
||||||
{
|
|
||||||
if (e.jaxis.value < -SETUP_DEAD_ZONE)
|
|
||||||
{
|
|
||||||
e.jaxis.value = e.jaxis.value - SETUP_DEAD_ZONE;
|
|
||||||
MessageBoxA(NULL, "Axis 4 Moved", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jaxis.value > SETUP_DEAD_ZONE)
|
|
||||||
{
|
|
||||||
e.jaxis.value = e.jaxis.value + SETUP_DEAD_ZONE;
|
|
||||||
MessageBoxA(NULL, "Axis 4 Moved", "", 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (e.jaxis.axis == 5)
|
|
||||||
{
|
|
||||||
if (e.jaxis.value < -SETUP_DEAD_ZONE)
|
|
||||||
{
|
|
||||||
e.jaxis.value = e.jaxis.value - SETUP_DEAD_ZONE;
|
|
||||||
MessageBoxA(NULL, "Axis 5 Moved", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jaxis.value > SETUP_DEAD_ZONE)
|
|
||||||
{
|
|
||||||
e.jaxis.value = e.jaxis.value + SETUP_DEAD_ZONE;
|
|
||||||
MessageBoxA(NULL, "Axis 5 Moved", "", 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (e.jaxis.axis == 6)
|
|
||||||
{
|
|
||||||
if (e.jaxis.value < -SETUP_DEAD_ZONE)
|
|
||||||
{
|
|
||||||
e.jaxis.value = e.jaxis.value - SETUP_DEAD_ZONE;
|
|
||||||
MessageBoxA(NULL, "Axis 6 Moved", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jaxis.value > SETUP_DEAD_ZONE)
|
|
||||||
{
|
|
||||||
e.jaxis.value = e.jaxis.value + SETUP_DEAD_ZONE;
|
|
||||||
MessageBoxA(NULL, "Axis 6 Moved", "", 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (e.jaxis.axis == 7)
|
|
||||||
{
|
|
||||||
if (e.jaxis.value < -SETUP_DEAD_ZONE)
|
|
||||||
{
|
|
||||||
e.jaxis.value = e.jaxis.value - SETUP_DEAD_ZONE;
|
|
||||||
MessageBoxA(NULL, "Axis 7 Moved", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jaxis.value > SETUP_DEAD_ZONE)
|
|
||||||
{
|
|
||||||
e.jaxis.value = e.jaxis.value + SETUP_DEAD_ZONE;
|
|
||||||
MessageBoxA(NULL, "Axis 7 Moved", "", 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (e.jaxis.axis == 8)
|
|
||||||
{
|
|
||||||
if (e.jaxis.value < -SETUP_DEAD_ZONE)
|
|
||||||
{
|
|
||||||
e.jaxis.value = e.jaxis.value - SETUP_DEAD_ZONE;
|
|
||||||
MessageBoxA(NULL, "Axis 8 Moved", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jaxis.value > SETUP_DEAD_ZONE)
|
|
||||||
{
|
|
||||||
e.jaxis.value = e.jaxis.value + SETUP_DEAD_ZONE;
|
|
||||||
MessageBoxA(NULL, "Axis 8 Moved", "", 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (e.jaxis.axis == 9)
|
|
||||||
{
|
|
||||||
if (e.jaxis.value < -SETUP_DEAD_ZONE)
|
|
||||||
{
|
|
||||||
e.jaxis.value = e.jaxis.value - SETUP_DEAD_ZONE;
|
|
||||||
MessageBoxA(NULL, "Axis 9 Moved", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jaxis.value > SETUP_DEAD_ZONE)
|
|
||||||
{
|
|
||||||
e.jaxis.value = e.jaxis.value + SETUP_DEAD_ZONE;
|
|
||||||
MessageBoxA(NULL, "Axis 9 Moved", "", 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (e.jaxis.axis == 10)
|
|
||||||
{
|
|
||||||
if (e.jaxis.value < -SETUP_DEAD_ZONE)
|
|
||||||
{
|
|
||||||
e.jaxis.value = e.jaxis.value - SETUP_DEAD_ZONE;
|
|
||||||
MessageBoxA(NULL, "Axis 10 Moved", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jaxis.value > SETUP_DEAD_ZONE)
|
|
||||||
{
|
|
||||||
e.jaxis.value = e.jaxis.value + SETUP_DEAD_ZONE;
|
|
||||||
MessageBoxA(NULL, "Axis 10 Moved", "", 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -683,69 +555,11 @@ void RoadFighters3D::FFBLoop(EffectConstants *constants, Helpers *helpers, Effec
|
|||||||
{
|
{
|
||||||
if (e.jaxis.which == joystick_index1 || e.jaxis.which == joystick_index2)
|
if (e.jaxis.which == joystick_index1 || e.jaxis.which == joystick_index2)
|
||||||
{
|
{
|
||||||
if (e.jbutton.button == 0)
|
if (e.jbutton.button >= 0)
|
||||||
{
|
{
|
||||||
MessageBoxA(NULL, "Button 0 Pressed", "", 0);
|
char buff[100];
|
||||||
}
|
sprintf_s(buff, "Button %d Pressed", e.jbutton.button);
|
||||||
else if (e.jbutton.button == 1)
|
MessageBoxA(NULL, buff, "", NULL);
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 1 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 2)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 2 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 3)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 3 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 4)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 4 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 5)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 5 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 6)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 6 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 7)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 7 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 8)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 8 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 9)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 9 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 10)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 10 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 11)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 11 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 12)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 12 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 13)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 13 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 14)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 14 Pressed", "", 0);
|
|
||||||
}
|
|
||||||
else if (e.jbutton.button == 15)
|
|
||||||
{
|
|
||||||
MessageBoxA(NULL, "Button 15 Pressed", "", 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,27 +14,7 @@ along with FFB Arcade Plugin.If not, see < https://www.gnu.org/licenses/>.
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include "SegaRally3.h"
|
#include "SegaRally3.h"
|
||||||
|
|
||||||
static int __stdcall Out32(DWORD device, DWORD data)
|
|
||||||
{
|
|
||||||
/*static char test[256];
|
|
||||||
memset(test, 0, 256);
|
|
||||||
sprintf(test, "hex print: %08X", data);
|
|
||||||
OutputDebugStringA(test);
|
|
||||||
return 0;*/
|
|
||||||
}
|
|
||||||
|
|
||||||
void SegaRally3::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers) {
|
void SegaRally3::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers) {
|
||||||
/*bool init = false;
|
|
||||||
HMODULE hMod = GetModuleHandleA("inpout32.dll");
|
|
||||||
if (hMod)
|
|
||||||
{
|
|
||||||
if (!init)
|
|
||||||
{
|
|
||||||
//injector::MakeJMP((DWORD)GetProcAddress(GetModuleHandle(L"inpout32.dll"), "Inp32"), Inp32);
|
|
||||||
injector::MakeJMP((DWORD)GetProcAddress(GetModuleHandle(L"inpout32.dll"), "Out32"), Out32);
|
|
||||||
init = true;
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
helpers->log("in SR3 Ffbloop");
|
helpers->log("in SR3 Ffbloop");
|
||||||
const int ff = GetTeknoParrotFFB();
|
const int ff = GetTeknoParrotFFB();
|
||||||
std::string ffs = std::to_string(ff);
|
std::string ffs = std::to_string(ff);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user