Skip to content

Commit

Permalink
what the fuck
Browse files Browse the repository at this point in the history
what the fuck

if I send my ports to puae's 0 and 1, both go to port 0
if I send my ports to puae's 1 and 2, they go to ports 1 and 2
if I send both of my ports to puae's 0, they go to ports 0 and 1

what the fuck
  • Loading branch information
vadosnaprimer committed Nov 10, 2024
1 parent c7d87c4 commit f1fa827
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
Binary file modified Assets/dll/puae.wbx.zst
Binary file not shown.
28 changes: 16 additions & 12 deletions waterbox/uae/bizhawk.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,20 @@ ECL_EXPORT void FrameAdvance(MyFrameInfo* f)
switch (controller->Type)
{
case CONTROLLER_JOYSTICK:
setjoystickstate(port, AXIS_VERTICAL, controller->Buttons.up ? JOY_MIN :
controller->Buttons.down ? JOY_MAX : JOY_MID, 1);
setjoystickstate(port, AXIS_HORIZONTAL, controller->Buttons.left ? JOY_MIN :
controller->Buttons.right ? JOY_MAX : JOY_MID, 1);
setjoybuttonstate(port, JOYBUTTON_1, controller->Buttons.b1);
setjoybuttonstate(port, JOYBUTTON_2, controller->Buttons.b2);
setjoybuttonstate(port, JOYBUTTON_3, controller->Buttons.b3);
setjoystickstate(0, AXIS_VERTICAL, controller->Buttons.up ? JOY_MIN :
controller->Buttons.down ? JOY_MAX : JOY_MID, 1);
setjoystickstate(0, AXIS_HORIZONTAL, controller->Buttons.left ? JOY_MIN :
controller->Buttons.right ? JOY_MAX : JOY_MID, 1);
setjoybuttonstate(0, JOYBUTTON_1, controller->Buttons.b1);
setjoybuttonstate(0, JOYBUTTON_2, controller->Buttons.b2);
setjoybuttonstate(0, JOYBUTTON_3, controller->Buttons.b3);
break;
case CONTROLLER_CD32PAD:
cd32_pad_enabled[port] = 1;
setjoystickstate(0, AXIS_VERTICAL, controller->Buttons.up ? JOY_MIN :
controller->Buttons.down ? JOY_MAX : JOY_MID, 1);
setjoystickstate(0, AXIS_HORIZONTAL, controller->Buttons.left ? JOY_MIN :
controller->Buttons.right ? JOY_MAX : JOY_MID, 1);
SetCD32ButtonState(port, JOYBUTTON_CD32_PLAY, controller->Buttons.play);
SetCD32ButtonState(port, JOYBUTTON_CD32_RWD, controller->Buttons.rewind);
SetCD32ButtonState(port, JOYBUTTON_CD32_FFW, controller->Buttons.forward);
Expand All @@ -67,11 +71,11 @@ ECL_EXPORT void FrameAdvance(MyFrameInfo* f)
SetCD32ButtonState(port, JOYBUTTON_CD32_BLUE, controller->Buttons.blue);
break;
case CONTROLLER_MOUSE:
setmousestate(port, AXIS_HORIZONTAL, controller->MouseX - last_mouse_x[port], MOUSE_RELATIVE);
setmousestate(port, AXIS_VERTICAL, controller->MouseY - last_mouse_y[port], MOUSE_RELATIVE);
setmousebuttonstate(port, MOUSE_LEFT, controller->Buttons.b1);
setmousebuttonstate(port, MOUSE_RIGHT, controller->Buttons.b2);
setmousebuttonstate(port, MOUSE_MIDDLE, controller->Buttons.b3);
setmousestate(0, AXIS_HORIZONTAL, controller->MouseX - last_mouse_x[port], MOUSE_RELATIVE);
setmousestate(0, AXIS_VERTICAL, controller->MouseY - last_mouse_y[port], MOUSE_RELATIVE);
setmousebuttonstate(0, MOUSE_LEFT, controller->Buttons.b1);
setmousebuttonstate(0, MOUSE_RIGHT, controller->Buttons.b2);
setmousebuttonstate(0, MOUSE_MIDDLE, controller->Buttons.b3);
break;
}
}
Expand Down

0 comments on commit f1fa827

Please sign in to comment.