mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-22 18:15:14 +00:00
* Rework framework to allow for more types of mouse-to-something emulation and hook up gyro to it * Remove the unnecessary null check now that deltatime is handled differently * Fix toggle key * Basic gyro emulation working for two out of the three dimensions * clang * Added bindable key to hold for switching from looking to the sides to rolling * documentation
29 lines
703 B
C++
29 lines
703 B
C++
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include "SDL3/SDL.h"
|
|
#include "common/types.h"
|
|
|
|
namespace Input {
|
|
|
|
enum MouseMode {
|
|
Off = 0,
|
|
Joystick,
|
|
Gyro,
|
|
};
|
|
|
|
bool ToggleMouseModeTo(MouseMode m);
|
|
void SetMouseToJoystick(int joystick);
|
|
void SetMouseParams(float mouse_deadzone_offset, float mouse_speed, float mouse_speed_offset);
|
|
void SetMouseGyroRollMode(bool mode);
|
|
|
|
void EmulateJoystick(GameController* controller, u32 interval);
|
|
void EmulateGyro(GameController* controller, u32 interval);
|
|
|
|
// Polls the mouse for changes
|
|
Uint32 MousePolling(void* param, Uint32 id, Uint32 interval);
|
|
|
|
} // namespace Input
|