Skip to content

Commit

Permalink
I dont care about the screen name
Browse files Browse the repository at this point in the history
  • Loading branch information
smasherprog committed Aug 2, 2017
1 parent f715c6c commit 4bf2b08
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
3 changes: 1 addition & 2 deletions include/Internal/ThreadManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions src/Internal/ThreadManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ void SL::Screen_Capture::ThreadManager::Init(const std::shared_ptr<Thread_Data>&
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]);
Expand Down
6 changes: 2 additions & 4 deletions src/ScreenCapture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_);
}
Expand Down

0 comments on commit 4bf2b08

Please sign in to comment.