puae input: fixed?

This commit is contained in:
feos 2024-11-16 22:04:42 +03:00
parent 14d5f5595c
commit ef307c1e69
7 changed files with 115 additions and 8 deletions

Binary file not shown.

View File

@ -238,6 +238,26 @@ namespace BizHawk.Emulation.Cores.Computers.Amiga
AppendSetting("input.mouse_speed=" + settings.MouseSpeed);
AppendSetting("sound_stereo_separation=" + settings.StereoSeparation / 10);
for (int port = 0; port <= 1; port++)
{
LibPUAE.ControllerType type = port == 0
? settings.ControllerPort1
: settings.ControllerPort2;
switch (type)
{
case LibPUAE.ControllerType.Joystick:
AppendSetting($"joyport{port}mode=djoy");
break;
case LibPUAE.ControllerType.CD32_pad:
AppendSetting($"joyport{port}mode=cd32joy");
break;
case LibPUAE.ControllerType.Mouse:
AppendSetting($"joyport{port}mode=mouse");
break;
}
}
}
private void EnableCycleExact()

View File

@ -0,0 +1,16 @@
{
"configurations": [
{
"name": "Waterbox",
"includePath": [
"${workspaceFolder}/**",
"${workspaceFolder}/../emulibc"
],
"defines": [
"WATERBOX"
],
"intelliSenseMode": "gcc-x64"
}
],
"version": 4
}

20
waterbox/uae/.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,20 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Debug attach",
"type": "cppdbg",
"request": "attach",
"program": "/usr/bin/mono",
"processId": "${command:pickProcess}",
"MIMode": "gdb",
"miDebuggerPath": "/usr/bin/gdb",
"miDebuggerArgs":
"-iex \"han SIG35 nos nopr\" -iex \"han SIG36 nos nopr\" -iex \"han SIGSEGV nos nopr\"",
"setupCommands": []
},
]
}

6
waterbox/uae/.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,6 @@
{
"files.associations": {
"*.def": "c",
"*.h": "c",
}
}

46
waterbox/uae/.vscode/tasks.json vendored Normal file
View File

@ -0,0 +1,46 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "make-install",
"command": "make",
"args": [
"-j8",
"install"
],
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": false
}
},
{
"type": "shell",
"label": "make-install-debug",
"command": "make",
"args": [
"-j8",
"install-debug"
],
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"type": "shell",
"label": "clean",
"command": "make",
"args": [
"clean"
],
"problemMatcher": []
}
]
}

View File

@ -52,9 +52,9 @@ ECL_EXPORT void FrameAdvance(MyFrameInfo* f)
cd32_pad_enabled[port] = 0;
joydir[port] = 0;
SetJoyButtonRaw( port, JOYBUTTON_1, controller->Buttons.b1);
SetJoyButtonRaw( port, JOYBUTTON_2, controller->Buttons.b2);
SetJoyButtonRaw( port, JOYBUTTON_3, controller->Buttons.b3);
SetJoyButtonRaw (port, JOYBUTTON_1, controller->Buttons.b1);
SetJoyButtonRaw (port, JOYBUTTON_2, controller->Buttons.b2);
SetJoyButtonRaw (port, JOYBUTTON_3, controller->Buttons.b3);
SetJoyDirectionRaw(port, DIR_LEFT, controller->Buttons.left);
SetJoyDirectionRaw(port, DIR_RIGHT, controller->Buttons.right);
SetJoyDirectionRaw(port, DIR_UP, controller->Buttons.up);
@ -77,13 +77,12 @@ ECL_EXPORT void FrameAdvance(MyFrameInfo* f)
joymousecounter(port);
break;
case CONTROLLER_MOUSE:
mouse_delta[port][AXIS_HORIZONTAL] = controller->MouseX - last_mouse_x[port];
mouse_delta[port][AXIS_VERTICAL] = controller->MouseY - last_mouse_y[port];
mouse_delta[port][AXIS_HORIZONTAL] += controller->MouseX - last_mouse_x[port];
mouse_delta[port][AXIS_VERTICAL ] += controller->MouseY - last_mouse_y[port];
mouse_deltanoreset[port][AXIS_HORIZONTAL] = 0;
mouse_deltanoreset[port][AXIS_VERTICAL ] = 0;
break;
}
mouse_deltanoreset[port][0] = 1;
mouse_deltanoreset[port][1] = 1;
}
for (int i = 0; i < KEY_COUNT; i++)