summaryrefslogtreecommitdiffhomepage
path: root/video-ps3eye/module.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'video-ps3eye/module.cpp')
-rw-r--r--video-ps3eye/module.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/video-ps3eye/module.cpp b/video-ps3eye/module.cpp
index 1d4e43f1..a7078180 100644
--- a/video-ps3eye/module.cpp
+++ b/video-ps3eye/module.cpp
@@ -169,7 +169,7 @@ bool ps3eye_camera::start(info& args)
ptr.in.gain = (uint8_t)s.gain;
ptr.in.exposure = (uint8_t)s.exposure;
- sleep_ms = (int)std::ceil(1000./std::max(1, (int)ptr.in.framerate));
+ sleep_ms = std::clamp(int(std::floor(1000./ptr.in.framerate*2)), 1, 10);
wrapper.start();