mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-24 04:46:56 +02:00
Input mapping tabs UI, emulated touchpad, and rumble for non-PS5 controllers (#1541)
* Revamp input mapping dialog with tabs, gamepad remapping and gyro emulation toggle Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Add emulated touchpad (mouse/gamepad) with particle skins; widen input dialog Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Disable mouse touchpad mode when the cursor leaves the window Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Add touchpad hand-cursor toggle; share touchpad options across both tabs Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Hide touchpad trail and particles when the visual toggle is off Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Rename input mapping tabs Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Rumble non-DualSense gamepads from haptic audio Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * Fix input mapping, touchpad transitions, and rumble fallback --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Co-authored-by: nmzik <Nmzik@mail.ru>
This commit is contained in:
@@ -8,10 +8,33 @@ union SDL_Event;
|
||||
|
||||
namespace Libs::Graphics {
|
||||
|
||||
struct HostInputTouchPadVisualState {
|
||||
bool enabled = false;
|
||||
bool cursor_visible = true;
|
||||
bool drawing = false;
|
||||
bool position_valid = false;
|
||||
float x = 0.5f;
|
||||
float y = 0.5f;
|
||||
uint64_t revision = 0;
|
||||
uint64_t gesture = 0;
|
||||
};
|
||||
|
||||
void HostInputInit(SDL_Window* window);
|
||||
void HostInputShutdown();
|
||||
void HostInputKey(int key_code, bool down);
|
||||
void HostInputMouseButton(uint8_t mouse_button, bool down);
|
||||
void HostInputMouseTouchPad(bool down, float x, float y);
|
||||
void HostInputMouseMotion(float x, float y);
|
||||
void HostInputPadButton(int id, int sdl_button, bool down);
|
||||
void HostInputPadTrigger(int id, bool left, int value);
|
||||
void HostInputDisconnectGamepad(int id);
|
||||
void HostInputSetTouchPadMode(bool enabled);
|
||||
void HostInputToggleTouchPadMode();
|
||||
void HostInputToggleGamepadTouchPad(int id);
|
||||
[[nodiscard]] bool HostInputGamepadDrawButton(int id, bool down);
|
||||
[[nodiscard]] bool HostInputGamepadAxis(int id, bool horizontal, int value);
|
||||
void HostInputDisconnectGamepadTouchPad(int id);
|
||||
[[nodiscard]] HostInputTouchPadVisualState GetHostInputTouchPadVisualState();
|
||||
void HostInputToggleMouseToJoystick();
|
||||
[[nodiscard]] bool HostInputWaitEvent(SDL_Event* event, int max_wait_ms);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user