mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 13:20:27 -06:00
problem: TryAcquireSRWLockExclusive requires Windows 7 :/. solution kinda: use std::recursive_mutex (CriticalSection on windows) where try_lock is used. Dolphin should work on Vista x64 again.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7313 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -595,8 +595,8 @@ bool Host_GetKeyState(int keycode)
|
||||
#ifdef _WIN32
|
||||
return GetAsyncKeyState(keycode);
|
||||
#elif defined __WXGTK__
|
||||
std::unique_lock<std::mutex> lk(main_frame->keystate_lock, std::defer_lock);
|
||||
if (!lk.try_lock())
|
||||
std::unique_lock<std::recursive_mutex> lk(main_frame->keystate_lock, std::try_to_lock);
|
||||
if (!lk.owns_lock())
|
||||
return false;
|
||||
|
||||
bool key_pressed;
|
||||
|
Reference in New Issue
Block a user