mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-26 04:16:18 +00:00
Emulate motion controls with a mouse (#3122)
* 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
This commit is contained in:
parent
be12305f65
commit
551751df3c
7 changed files with 88 additions and 30 deletions
|
@ -474,11 +474,16 @@ void WindowSDL::OnKeyboardMouseInput(const SDL_Event* event) {
|
|||
Input::ParseInputConfig(std::string(Common::ElfInfo::Instance().GameSerial()));
|
||||
return;
|
||||
}
|
||||
// Toggle mouse capture and movement input
|
||||
// Toggle mouse capture and joystick input emulation
|
||||
else if (input_id == SDLK_F7) {
|
||||
Input::ToggleMouseEnabled();
|
||||
SDL_SetWindowRelativeMouseMode(this->GetSDLWindow(),
|
||||
!SDL_GetWindowRelativeMouseMode(this->GetSDLWindow()));
|
||||
Input::ToggleMouseModeTo(Input::MouseMode::Joystick));
|
||||
return;
|
||||
}
|
||||
// Toggle mouse capture and gyro input emulation
|
||||
else if (input_id == SDLK_F6) {
|
||||
SDL_SetWindowRelativeMouseMode(this->GetSDLWindow(),
|
||||
Input::ToggleMouseModeTo(Input::MouseMode::Gyro));
|
||||
return;
|
||||
}
|
||||
// Toggle fullscreen
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue