added timestamp in buttons state

This commit is contained in:
georgemoralis 2023-10-30 08:57:43 +02:00
parent 758ef332f2
commit 3602864523
3 changed files with 4 additions and 1 deletions

View file

@ -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 {