mirror of
https://github.com/libretro/FBNeo.git
synced 2025-03-09 04:43:17 +00:00
tempest: control fix bug from gamezfan, also put a limit on the velocity to quench erratic movement from super-fast moving mouse
This commit is contained in:
parent
8a4d0b26f4
commit
11bce89a8b
@ -456,10 +456,10 @@ static INT32 DIAL_INC[2] = { 0, 0 };
|
||||
|
||||
static void update_dial()
|
||||
{ // half of the dial value added at the beginning of the frame, half in the middle of the frame.
|
||||
if (DrvJoy4f[0]) DrvDial[0] += DIAL_INC[0] / 2;
|
||||
if (DrvJoy4f[1]) DrvDial[0] -= DIAL_INC[0] / 2;
|
||||
if (DrvJoy4f[2]) DrvDial[1] += DIAL_INC[1] / 2;
|
||||
if (DrvJoy4f[3]) DrvDial[1] -= DIAL_INC[1] / 2;
|
||||
if (DrvJoy4f[0]) DrvDial[0] -= DIAL_INC[0] / 2;
|
||||
if (DrvJoy4f[1]) DrvDial[0] += DIAL_INC[0] / 2;
|
||||
if (DrvJoy4f[2]) DrvDial[1] -= DIAL_INC[1] / 2;
|
||||
if (DrvJoy4f[3]) DrvDial[1] += DIAL_INC[1] / 2;
|
||||
|
||||
DrvInputs[1] = (DrvDips[0] & 0x10) | (DrvDial[player] & 0x0f);
|
||||
}
|
||||
@ -492,12 +492,12 @@ static INT32 DrvFrame()
|
||||
BurnDialINF dial = BurnPaddleReturnA(0);
|
||||
if (dial.Backward) DrvJoy4f[0] = 1;
|
||||
if (dial.Forward) DrvJoy4f[1] = 1;
|
||||
DIAL_INC[0] += dial.Velocity;
|
||||
DIAL_INC[0] += ((dial.Velocity > 0xa) ? 0xa : dial.Velocity);
|
||||
|
||||
dial = BurnPaddleReturnB(0);
|
||||
if (dial.Backward) DrvJoy4f[2] = 1;
|
||||
if (dial.Forward) DrvJoy4f[3] = 1;
|
||||
DIAL_INC[1] += dial.Velocity;
|
||||
DIAL_INC[1] += ((dial.Velocity > 0xa) ? 0xa : dial.Velocity);
|
||||
|
||||
update_dial();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user