mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Don't block worker when in save file dialog.
This commit is contained in:
parent
c93170cd42
commit
7aca6b72d1
@ -1010,8 +1010,8 @@ bool View::DrawConnection()
|
|||||||
const auto wpos = ImGui::GetWindowPos() + ImGui::GetWindowContentRegionMin();
|
const auto wpos = ImGui::GetWindowPos() + ImGui::GetWindowContentRegionMin();
|
||||||
ImGui::GetWindowDrawList()->AddCircleFilled( wpos + ImVec2( 1 + cs * 0.5, 3 + ty * 0.5 ), cs * 0.5, m_worker.IsConnected() ? 0xFF2222CC : 0xFF444444, 10 );
|
ImGui::GetWindowDrawList()->AddCircleFilled( wpos + ImVec2( 1 + cs * 0.5, 3 + ty * 0.5 ), cs * 0.5, m_worker.IsConnected() ? 0xFF2222CC : 0xFF444444, 10 );
|
||||||
|
|
||||||
std::shared_lock<std::shared_mutex> lock( m_worker.GetDataLock() );
|
|
||||||
{
|
{
|
||||||
|
std::shared_lock<std::shared_mutex> lock( m_worker.GetDataLock() );
|
||||||
const auto sz = m_worker.GetFrameCount( *m_frames );
|
const auto sz = m_worker.GetFrameCount( *m_frames );
|
||||||
if( sz > 1 )
|
if( sz > 1 )
|
||||||
{
|
{
|
||||||
@ -1066,6 +1066,7 @@ bool View::DrawConnection()
|
|||||||
#else
|
#else
|
||||||
const char* stopStr = "Stop";
|
const char* stopStr = "Stop";
|
||||||
#endif
|
#endif
|
||||||
|
std::shared_lock<std::shared_mutex> lock( m_worker.GetDataLock() );
|
||||||
if( m_worker.IsConnected() )
|
if( m_worker.IsConnected() )
|
||||||
{
|
{
|
||||||
if( ImGui::Button( stopStr ) )
|
if( ImGui::Button( stopStr ) )
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user