Fix an issue when sf::Clock is constructed in a global scope leading to crashes.

This commit is contained in:
Lukas Dürrenberger 2017-08-01 17:49:14 +02:00
parent 745b446440
commit bc8a90b33a

View File

@ -33,8 +33,6 @@
namespace
{
sf::Mutex oldWindowsMutex;
LARGE_INTEGER getFrequency()
{
LARGE_INTEGER frequency;
@ -67,6 +65,8 @@ Time ClockImpl::getCurrentTime()
if (oldWindows)
{
static sf::Mutex oldWindowsMutex;
// Acquire a lock (CRITICAL_SECTION) to prevent travelling back in time
Lock lock(oldWindowsMutex);