mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 06:21:26 +12:00
input: add missing lock to keyboard handler ReleaseAllKeys
This should fix a segfault I encountered when closing a game. I think the consumers were removed while the window went out of focus.
This commit is contained in:
parent
8050e1f853
commit
11ee80a070
1 changed files with 2 additions and 0 deletions
|
@ -306,6 +306,8 @@ void keyboard_consumer::SetIntercepted(bool intercepted)
|
||||||
|
|
||||||
void KeyboardHandlerBase::ReleaseAllKeys()
|
void KeyboardHandlerBase::ReleaseAllKeys()
|
||||||
{
|
{
|
||||||
|
std::lock_guard<std::mutex> lock(m_mutex);
|
||||||
|
|
||||||
for (auto& [id, consumer] : m_consumers)
|
for (auto& [id, consumer] : m_consumers)
|
||||||
{
|
{
|
||||||
consumer.ReleaseAllKeys();
|
consumer.ReleaseAllKeys();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue