From 4bf2b08b243643d460293074998553adc6c2d782 Mon Sep 17 00:00:00 2001 From: Scott Date: Tue, 1 Aug 2017 21:16:23 -0700 Subject: [PATCH] I dont care about the screen name --- include/Internal/ThreadManager.h | 3 +-- src/Internal/ThreadManager.cpp | 3 +-- src/ScreenCapture.cpp | 6 ++---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/include/Internal/ThreadManager.h b/include/Internal/ThreadManager.h index 6ff0e196..237d2f4c 100644 --- a/include/Internal/ThreadManager.h +++ b/include/Internal/ThreadManager.h @@ -69,8 +69,7 @@ namespace SL for (size_t i = 0; i < startmonitors.size(); i++) { if (startmonitors[i].Height != nowmonitors[i].Height || startmonitors[i].Id != nowmonitors[i].Id || - startmonitors[i].Index != nowmonitors[i].Index || - startmonitors[i].Name != nowmonitors[i].Name || + startmonitors[i].Index != nowmonitors[i].Index || startmonitors[i].OffsetX != nowmonitors[i].OffsetX || startmonitors[i].OffsetY != nowmonitors[i].OffsetY || startmonitors[i].Width != nowmonitors[i].Width) return true; diff --git a/src/Internal/ThreadManager.cpp b/src/Internal/ThreadManager.cpp index 078fb539..b0d93932 100644 --- a/src/Internal/ThreadManager.cpp +++ b/src/Internal/ThreadManager.cpp @@ -26,8 +26,7 @@ void SL::Screen_Capture::ThreadManager::Init(const std::shared_ptr& assert(isMonitorInsideBounds(mons, m)); } - m_ThreadHandles.resize(monitors.size() + - (data->CaptureMouse ? 1 : 0)); // add another thread for mouse capturing if needed + m_ThreadHandles.resize(monitors.size() + (data->CaptureMouse ? 1 : 0)); // add another thread for mouse capturing if needed for(size_t i = 0; i < monitors.size(); ++i) { m_ThreadHandles[i] = std::thread(&SL::Screen_Capture::RunCaptureMonitor, data, monitors[i]); diff --git a/src/ScreenCapture.cpp b/src/ScreenCapture.cpp index 1e066ce8..2566d40c 100644 --- a/src/ScreenCapture.cpp +++ b/src/ScreenCapture.cpp @@ -77,11 +77,9 @@ namespace Screen_Capture if(Thread_Data_->ExpectedErrorEvent) { Thread_Data_->TerminateThreadsEvent = true; ThreadMgr.Join(); - Thread_Data_->ExpectedErrorEvent = Thread_Data_->UnexpectedErrorEvent = - Thread_Data_->TerminateThreadsEvent = false; + Thread_Data_->ExpectedErrorEvent = Thread_Data_->UnexpectedErrorEvent = Thread_Data_->TerminateThreadsEvent = false; // Clean up - std::this_thread::sleep_for( - std::chrono::milliseconds(1000)); // sleep for 1 second since an error occcured + std::this_thread::sleep_for( std::chrono::milliseconds(1000)); // sleep for 1 second since an error occcured ThreadMgr.Init(Thread_Data_); }