mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2026-07-17 16:36:49 +00:00
VNC-151 Adjust screenshot timer initialization and interval handling
This commit is contained in:
parent
39d5b1b7ba
commit
11214a870a
2 changed files with 5 additions and 1 deletions
|
|
@ -264,7 +264,7 @@ VNCServerST::VNCServerST(const char* name_, SDesktop* desktop_, const video_enco
|
|||
benchmark(file_name, Server::benchmarkResults.getValueStr());
|
||||
}
|
||||
|
||||
screenshotTimer.start(SCREENSHOT_INTERVAL_MS);
|
||||
screenshotTimer.start(FIRST_SCREENSHOT_INTERVAL_MS);
|
||||
}
|
||||
|
||||
VNCServerST::~VNCServerST()
|
||||
|
|
@ -773,6 +773,9 @@ bool VNCServerST::handleTimeout(Timer* t)
|
|||
apimessager->mainUpdateScreen(getPixelBuffer());
|
||||
}
|
||||
|
||||
if (screenshotTimer.getTimeoutMs() < SCREENSHOT_INTERVAL_MS)
|
||||
screenshotTimer.start(SCREENSHOT_INTERVAL_MS);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ namespace rfb {
|
|||
public Timer::Callback,
|
||||
public network::SocketServer {
|
||||
public:
|
||||
constexpr static int FIRST_SCREENSHOT_INTERVAL_MS = 5000;
|
||||
constexpr static int SCREENSHOT_INTERVAL_MS = 60000;
|
||||
// -=- Constructors
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue