mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
@ -101,7 +101,6 @@ struct OCM_HLP_CGIN
|
||||
} ocmptwo_cgin ;
|
||||
|
||||
|
||||
|
||||
CPlayerInterface::CPlayerInterface(PlayerColor Player)
|
||||
{
|
||||
logGlobal->traceStream() << "\tHuman player interface for player " << Player << " being constructed";
|
||||
@ -1503,8 +1502,16 @@ void CPlayerInterface::centerView (int3 pos, int focusTime)
|
||||
if(focusTime)
|
||||
{
|
||||
GH.totalRedraw();
|
||||
#ifdef VCMI_SDL1
|
||||
CSDL_Ext::update(screen);
|
||||
SDL_Delay(focusTime);
|
||||
#else
|
||||
{
|
||||
auto unlockPim = vstd::makeUnlockGuard(*pim);
|
||||
IgnoreEvents ignore(*this);
|
||||
SDL_Delay(focusTime);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -2553,6 +2560,16 @@ bool CPlayerInterface::capturedAllEvents()
|
||||
return true;
|
||||
}
|
||||
|
||||
if(ignoreEvents)
|
||||
{
|
||||
boost::unique_lock<boost::mutex> un(eventsM);
|
||||
while(!events.empty())
|
||||
{
|
||||
events.pop();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user