void check(time_t now, Front & front) { // Procedure which stops the recording on inactivity if (this->last_record_activity_time == 0) this->last_record_activity_time = now; if ((front.get_total_received() == this->last_total_received) && (front.get_total_sent() == this->last_total_sent)) { if (!this->stop_record_inactivity && (now > this->last_record_activity_time + this->stop_record_time)) { this->stop_record_inactivity = true; front.can_be_pause_capture(); } } else { this->last_record_activity_time = now; this->last_total_received = front.get_total_received(); this->last_total_sent = front.get_total_sent(); // front.trans->reset_quantum_sent(); // Here we only reset the quantum sent // because Check() will already reset the // quantum received when checking for inactivity if (this->stop_record_inactivity) { this->stop_record_inactivity = false; if (front.can_be_resume_capture()) { if (this->ini.get<cfg::globals::bogus_refresh_rect>() && this->ini.get<cfg::globals::allow_using_multiple_monitors>() && (this->front.client_info.cs_monitor.monitorCount > 1)) { this->mm.mod->rdp_suppress_display_updates(); this->mm.mod->rdp_allow_display_updates(0, 0, this->front.client_info.width, this->front.client_info.height); } this->mm.mod->rdp_input_invalidate(Rect( 0, 0, this->front.client_info.width, this->front.client_info.height)); } } } }
void check(time_t now, Front & front) { // Procedure which stops the recording on inactivity if (this->last_record_activity_time == 0) this->last_record_activity_time = now; if ((front.get_total_received() == this->last_total_received) && (front.get_total_sent() == this->last_total_sent)) { if (!this->stop_record_inactivity && (now > this->last_record_activity_time + this->stop_record_time)) { this->stop_record_inactivity = true; front.pause_capture(); } } else { this->last_record_activity_time = now; this->last_total_received = front.get_total_received(); this->last_total_sent = front.get_total_sent(); // front.trans->reset_quantum_sent(); // Here we only reset the quantum sent // because Check() will already reset the // quantum received when checking for inactivity if (this->stop_record_inactivity) { this->stop_record_inactivity = false; front.resume_capture(); // resume capture } } }