Add attention callback helper.

This commit is contained in:
Bartosz Taudul 2022-10-13 20:36:54 +02:00
parent 0a7ae94fcb
commit 94fd3b664e
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
2 changed files with 11 additions and 0 deletions

View File

@ -349,6 +349,8 @@ private:
void SetPlaybackFrame( uint32_t idx );
bool Save( const char* fn, FileWrite::Compression comp, int zlevel, bool buildDict );
void Attention( bool& alreadyDone );
unordered_flat_map<uint64_t, bool> m_visibleMsgThread;
unordered_flat_map<uint64_t, bool> m_waitStackThread;
unordered_flat_map<const void*, int> m_gpuDrift;

View File

@ -864,4 +864,13 @@ const char* View::GetThreadContextData( uint64_t thread, bool& _local, bool& _un
return label;
}
void View::Attention( bool& alreadyDone )
{
if( !alreadyDone )
{
alreadyDone = true;
m_acb();
}
}
}