mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Replaced CPlayerInterface::pim with CGuiHandler::interfaceLock
- Removed CPlayerInterface::pim since this lock does not actually protects LOCPLINT but rather entire game UI state - added more logical CGuiHandler::interfaceLock - interface lock is now non-recursive and is locked only once by initial caller that want to access GUI
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "../CCallback.h"
|
||||
#include "../CGameInfo.h"
|
||||
#include "../CPlayerInterface.h"
|
||||
#include "../gui/CGuiHandler.h"
|
||||
|
||||
#include "../../lib/CGeneralTextHandler.h"
|
||||
#include "../../lib/TerrainHandler.h"
|
||||
@@ -37,7 +38,7 @@ void CMapHandler::waitForOngoingAnimations()
|
||||
{
|
||||
while(CGI->mh->hasOngoingAnimations())
|
||||
{
|
||||
auto unlockPim = vstd::makeUnlockGuard(*CPlayerInterface::pim);
|
||||
auto unlockPim = vstd::makeUnlockGuard(GH.interfaceMutex);
|
||||
boost::this_thread::sleep_for(boost::chrono::milliseconds(1));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user