1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

Run all rendering with pim lock if possible

This commit is contained in:
AlexVinS
2014-07-03 22:05:59 +04:00
parent 30d6eab20b
commit 9b8ad51cd3
7 changed files with 77 additions and 36 deletions

View File

@@ -4,6 +4,14 @@
#include "SDL_Extensions.h"
#include "../CMessage.h"
void IUpdateable::runLocked(std::function<void(IUpdateable*)> cb)
{
boost::unique_lock<boost::recursive_mutex> lock(updateGuard);
cb(this);
}
CIntObject::CIntObject(int used_, Point pos_):
parent_m(nullptr),
active_m(0),