mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-25 12:10:14 +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::map<KeyboardKey, bool> keysPressedCopy;
|
||||||
|
{
|
||||||
std::lock_guard<std::mutex> lock(m);
|
std::lock_guard<std::mutex> lock(m);
|
||||||
auto keysPressedCopy = keysPressed;
|
keysPressedCopy = keysPressed;
|
||||||
lock.~lock_guard();
|
}
|
||||||
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