include monitor dimensions when logging about zone mismatch
This commit is contained in:
parent
765886ae72
commit
209d45c5f0
|
@ -874,16 +874,23 @@ std::vector<Zone> Zone::Load(Monitor *monitor) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (polygon.Extent().Lo().x_ < 0 || polygon.Extent().Hi().x_ > static_cast<int32>(monitor->Width())
|
if (polygon.Extent().Lo().x_ < 0
|
||||||
|| polygon.Extent().Lo().y_ < 0 || polygon.Extent().Hi().y_ > static_cast<int32>(monitor->Height())) {
|
||
|
||||||
Error("Zone %d/%s for monitor %s extends outside of image dimensions, (%d,%d), (%d,%d), fixing",
|
polygon.Extent().Hi().x_ > static_cast<int32>(monitor->Width())
|
||||||
|
||
|
||||||
|
polygon.Extent().Lo().y_ < 0
|
||||||
|
||
|
||||||
|
polygon.Extent().Hi().y_ > static_cast<int32>(monitor->Height())) {
|
||||||
|
Error("Zone %d/%s for monitor %s extends outside of image dimensions, (%d,%d), (%d,%d) != (%d,%d), fixing",
|
||||||
Id,
|
Id,
|
||||||
Name,
|
Name,
|
||||||
monitor->Name(),
|
monitor->Name(),
|
||||||
polygon.Extent().Lo().x_,
|
polygon.Extent().Lo().x_,
|
||||||
polygon.Extent().Lo().y_,
|
polygon.Extent().Lo().y_,
|
||||||
polygon.Extent().Hi().x_,
|
polygon.Extent().Hi().x_,
|
||||||
polygon.Extent().Hi().y_);
|
polygon.Extent().Hi().y_,
|
||||||
|
monitor->Width(),
|
||||||
|
monitor->Height());
|
||||||
|
|
||||||
polygon.Clip(Box(
|
polygon.Clip(Box(
|
||||||
{0, 0},
|
{0, 0},
|
||||||
|
|
Loading…
Reference in New Issue