mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	Lock UI while adventure map has animations
This commit is contained in:
		| @@ -2029,13 +2029,15 @@ bool CPlayerInterface::capturedAllEvents() | ||||
| 	if (duringMovement) | ||||
| 	{ | ||||
| 		//just inform that we are capturing events. they will be processed by heroMoved() in client thread. | ||||
| 		return true; | ||||
| 	} | ||||
|  | ||||
| 	if (ignoreEvents) | ||||
| 	{ | ||||
| 		boost::unique_lock<boost::mutex> un(eventsM); | ||||
| 		while(!SDLEventsQueue.empty()) | ||||
| 		return true; | ||||
| 	} | ||||
|  | ||||
| 	bool needToLockAdventureMap = adventureInt->active && CGI->mh->hasOngoingAnimations(); | ||||
|  | ||||
| 	if (ignoreEvents || needToLockAdventureMap) | ||||
| 	{ | ||||
| 		boost::unique_lock<boost::mutex> un(eventsM); | ||||
| 		while(!SDLEventsQueue.empty()) | ||||
| 		{ | ||||
| 			SDLEventsQueue.pop(); | ||||
| 		} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user