1
0
mirror of https://github.com/DarthAffe/CUE.NET.git synced 2025-12-12 16:58:29 +00:00

Fixed wrong offset validation in the Ambilight-example

This commit is contained in:
Darth Affe 2016-11-12 13:46:02 +01:00
parent deb043b6b2
commit 633636efda

View File

@ -43,7 +43,7 @@ namespace Example_Ambilight_full
// DarthAffe 06.11.2016: Validate offsets - rounding errors might cause problems
widthOffset = Math.Max(0, Math.Min(SourceWidth - widthPixels, widthOffset));
heightOffset = Math.Max(0, Math.Min(EffectiveSourceHeight - heightPixels, heightOffset));
heightOffset = Math.Max(0, Math.Min(SourceHeight - heightPixels, heightOffset));
for (int y = 0; y < heightPixels; y += Increment)
for (int x = 0; x < widthPixels; x += Increment)