mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
Device visualizer - Never return NaN measurements
Device logical layout picker - Fixed NRE Surface manager - Improve thread safety
This commit is contained in:
1 parent
7e72e22295
commit
38eb0ff460
4 files changed
+75
-90
No files matched your search
@@ -153,9 +153,9 @@ public class DeviceVisualizer : Control
|
||||
|
||||
private Rect MeasureDevice()
|
||||
{
|
||||
if (Device == null)
|
||||
if (Device == null || float.IsNaN(Device.RgbDevice.ActualSize.Width) || float.IsNaN(Device.RgbDevice.ActualSize.Height))
|
||||
return new Rect();
|
||||
|
||||
|
||||
Rect deviceRect = new(0, 0, Device.RgbDevice.ActualSize.Width, Device.RgbDevice.ActualSize.Height);
|
||||
Geometry geometry = new RectangleGeometry(deviceRect);
|
||||
geometry.Transform = new RotateTransform(Device.Rotation);
|
||||
|
||||
Reference in new issue
Block a user