mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -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:
@ -118,7 +118,7 @@ void ControllerInterface::SetHwnd( void* const hwnd )
|
||||
//
|
||||
bool ControllerInterface::UpdateInput(const bool force)
|
||||
{
|
||||
std::unique_lock<std::mutex> lk(update_lock, std::defer_lock);
|
||||
std::unique_lock<std::recursive_mutex> lk(update_lock, std::defer_lock);
|
||||
|
||||
if (force)
|
||||
lk.lock();
|
||||
@ -149,7 +149,7 @@ bool ControllerInterface::UpdateInput(const bool force)
|
||||
//
|
||||
bool ControllerInterface::UpdateOutput(const bool force)
|
||||
{
|
||||
std::unique_lock<std::mutex> lk(update_lock, std::defer_lock);
|
||||
std::unique_lock<std::recursive_mutex> lk(update_lock, std::defer_lock);
|
||||
|
||||
if (force)
|
||||
lk.lock();
|
||||
|
@ -222,7 +222,7 @@ public:
|
||||
const std::vector<Device*>& Devices() const { return m_devices; }
|
||||
Device* FindDevice(const DeviceQualifier& devq) const;
|
||||
|
||||
std::mutex update_lock;
|
||||
std::recursive_mutex update_lock;
|
||||
|
||||
private:
|
||||
bool m_is_init;
|
||||
|
Reference in New Issue
Block a user