MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / clampToSource

Function clampToSource

plugins/base/utils/source-preview-widget.cpp:10–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8namespace advss {
9
10static int32_t clampToSource(int32_t v, uint32_t max)
11{
12 if (v < 0) {
13 return 0;
14 }
15 if (v > (int32_t)max) {
16 return (int32_t)max;
17 }
18 return v;
19}
20
21SourcePreviewWidget::SourcePreviewWidget(QWidget *parent,
22 obs_weak_source_t *source)

Callers 1

GetSourceRelativeXYMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected