mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-25 11:30:13 +00:00
Fix lock guard
This commit is contained in:
parent
743c4647b8
commit
750838581d
@ -18,9 +18,11 @@ bool Keyboard::InitDevice(int number, const std::map<std::string, std::vector<Ke
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Keyboard::ProcessInput() {
|
void Keyboard::ProcessInput() {
|
||||||
std::lock_guard<std::mutex> lock(m);
|
std::map<KeyboardKey, bool> keysPressedCopy;
|
||||||
auto keysPressedCopy = keysPressed;
|
{
|
||||||
lock.~lock_guard();
|
std::lock_guard<std::mutex> lock(m);
|
||||||
|
keysPressedCopy = keysPressed;
|
||||||
|
}
|
||||||
for (const auto &ent1 : keyMapping) {
|
for (const auto &ent1 : keyMapping) {
|
||||||
int scancode = std::stoul(ent1.first, nullptr, 16);
|
int scancode = std::stoul(ent1.first, nullptr, 16);
|
||||||
KeyboardKey proxy = KeyboardKey(0, scancode, "");
|
KeyboardKey proxy = KeyboardKey(0, scancode, "");
|
||||||
|
Loading…
Reference in New Issue
Block a user