mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-20 10:24:58 +00:00
core: Switch to std threading primitives
This commit is contained in:
parent
f39744cf62
commit
e2b1b059ed
24 changed files with 98 additions and 329 deletions
|
@ -5,7 +5,7 @@ GameController::GameController() { m_states_num = 0;
|
|||
m_last_state = State();
|
||||
}
|
||||
void GameController::readState(State* state, bool* isConnected, int* connectedCount) {
|
||||
Lib::LockMutexGuard lock(m_mutex);
|
||||
std::scoped_lock lock{m_mutex};
|
||||
|
||||
*isConnected = m_connected;
|
||||
*connectedCount = m_connected_count;
|
||||
|
@ -37,7 +37,7 @@ void GameController::addState(const State& state) {
|
|||
}
|
||||
|
||||
void GameController::checKButton(int id, u32 button, bool isPressed) {
|
||||
Lib::LockMutexGuard lock(m_mutex);
|
||||
std::scoped_lock lock{m_mutex};
|
||||
auto state = getLastState();
|
||||
if (isPressed) {
|
||||
state.buttonsState |= button;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue