mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-10 05:38:49 +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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user