[PR #2170] [MERGED] input: Don't use old input state in GameController::ReadState() #2533

Closed
opened 2026-02-27 22:00:17 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/2170
Author: @ngoquang2708
Created: 1/17/2025
Status: Merged
Merged: 1/18/2025
Merged by: @roamic

Base: mainHead: fix-input-lag


📝 Commits (5)

📊 Changes

5 files changed (+321 additions, -112 deletions)

View changed files

📝 src/core/libraries/pad/pad.cpp (+23 -10)
📝 src/input/controller.cpp (+77 -69)
📝 src/input/controller.h (+26 -10)
📝 src/sdl_window.cpp (+175 -21)
📝 src/sdl_window.h (+20 -2)

📄 Description

Fix input lag when there is multiple user inputs happen at the same time. SDL input events can only fire one at a time and game may get some input events later than other.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/shadps4-emu/shadPS4/pull/2170 **Author:** [@ngoquang2708](https://github.com/ngoquang2708) **Created:** 1/17/2025 **Status:** ✅ Merged **Merged:** 1/18/2025 **Merged by:** [@roamic](https://github.com/roamic) **Base:** `main` ← **Head:** `fix-input-lag` --- ### 📝 Commits (5) - [`f85ab38`](https://github.com/shadps4-emu/shadPS4/commit/f85ab38f9e8cd837106fa148e7cc8ef98f626d49) input: Don't use old input state in GameController::ReadState() - [`ecbee1f`](https://github.com/shadps4-emu/shadPS4/commit/ecbee1ff55c0ddcf2f7c735f0a7aa96e74a2bde9) input: More error checking - [`10ea1d2`](https://github.com/shadps4-emu/shadPS4/commit/10ea1d266ccafc102b0569c648233f3390443ce1) Use unique_ptr - [`8ac50a6`](https://github.com/shadps4-emu/shadPS4/commit/8ac50a614ee61a0c9e70e883f477cffce5afc73e) Cleanup - [`5dd67b9`](https://github.com/shadps4-emu/shadPS4/commit/5dd67b9dd83523bf63a47a485147f71d95a0af0f) Add missing return ### 📊 Changes **5 files changed** (+321 additions, -112 deletions) <details> <summary>View changed files</summary> 📝 `src/core/libraries/pad/pad.cpp` (+23 -10) 📝 `src/input/controller.cpp` (+77 -69) 📝 `src/input/controller.h` (+26 -10) 📝 `src/sdl_window.cpp` (+175 -21) 📝 `src/sdl_window.h` (+20 -2) </details> ### 📄 Description Fix input lag when there is multiple user inputs happen at the same time. SDL input events can only fire one at a time and game may get some input events later than other. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 22:00:17 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#2533
No description provided.