1
0
mirror of synced 2024-11-14 06:37:36 +01:00

Temp fix of HOTD4 acceleometer

This commit is contained in:
Bobby Dilley 2024-03-05 21:23:42 +00:00
parent 30afa4c928
commit 2a6b2ecf80

View File

@ -112,8 +112,14 @@ int XNextEventShooting(Display *display, XEvent *event_return, int returnValue)
setSwitch(PLAYER_1, BUTTON_3, event_return->type == KeyPress);
else if (event_return->xkey.keycode == keymap.player1.button4)
{
setSwitch(PLAYER_1, BUTTON_4, event_return->type == KeyPress);
// For The House of the Dead 4's Accelerometer
setAnalogue(ANALOGUE_5, 0);
setAnalogue(ANALOGUE_6, 0);
}
else if (event_return->xkey.keycode == keymap.player1.up)
setSwitch(PLAYER_1, BUTTON_UP, event_return->type == KeyPress);
@ -132,6 +138,9 @@ int XNextEventShooting(Display *display, XEvent *event_return, int returnValue)
{
setAnalogue(ANALOGUE_1, ((double)event_return->xmotion.x / (double)getConfig()->width) * pow(2, 10));
setAnalogue(ANALOGUE_2, ((double)event_return->xmotion.y / (double)getConfig()->height) * pow(2, 10));
// For The House of the Dead 4's Accelerometer
setAnalogue(ANALOGUE_5, pow(2, 10) / 2);
setAnalogue(ANALOGUE_6, pow(2, 10) / 2);
}
break;