summaryrefslogtreecommitdiff
path: root/src/managers/screenshare/ScreenshareSession.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/managers/screenshare/ScreenshareSession.cpp')
-rw-r--r--src/managers/screenshare/ScreenshareSession.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/managers/screenshare/ScreenshareSession.cpp b/src/managers/screenshare/ScreenshareSession.cpp
index 1f7aeb88..7e6aea6f 100644
--- a/src/managers/screenshare/ScreenshareSession.cpp
+++ b/src/managers/screenshare/ScreenshareSession.cpp
@@ -80,8 +80,9 @@ void CScreenshareSession::init() {
if (g_pEventLoopManager)
g_pEventLoopManager->addTimer(m_shareStopTimer);
- // scale capture box since it's in logical coords
- m_captureBox.scale(monitor()->m_scale);
+ // scale capture box since it's in logical coords; round to integer pixel
+ // dims so m_bufferSize matches the int32 size we send to the client
+ m_captureBox.scale(monitor()->m_scale).round();
m_listeners.monitorDestroyed = monitor()->m_events.disconnect.listen([this]() { stop(); });
m_listeners.monitorModeChanged = monitor()->m_events.modeChanged.listen([this]() {