mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-20 10:24:58 +00:00
added timestamp in buttons state
This commit is contained in:
parent
758ef332f2
commit
3602864523
3 changed files with 4 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
|||
#include "controller.h"
|
||||
#include <Core/hle/libraries/libkernel/time_management.h>
|
||||
|
||||
namespace Emulator::Host::Controller {
|
||||
GameController::GameController() { m_states_num = 0;
|
||||
|
@ -39,6 +40,7 @@ void GameController::addState(const State& state) {
|
|||
void GameController::checKButton(int id, u32 button, bool isPressed) {
|
||||
std::scoped_lock lock{m_mutex};
|
||||
auto state = getLastState();
|
||||
state.time = Core::Libraries::sceKernelGetProcessTime();
|
||||
if (isPressed) {
|
||||
state.buttonsState |= button;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue