From 26a45d5fa9ccac2964177e24d409ade66de95bde Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 25 Apr 2016 13:55:28 -0400 Subject: [PATCH] Don't rotate dimensions when constructing the monitor because they are already rotated --- src/zm_monitor.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index e96997ebc..e66256dea 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -306,8 +306,12 @@ Monitor::Monitor( server_id( p_server_id ), function( (Function)p_function ), enabled( p_enabled ), - width( (p_orientation==ROTATE_90||p_orientation==ROTATE_270)?p_camera->Height():p_camera->Width() ), - height( (p_orientation==ROTATE_90||p_orientation==ROTATE_270)?p_camera->Width():p_camera->Height() ), + // When we instantiate the camera, the dimensions are rotated. So if we rotate them again here, we undo the rotation. + // With this change, calls to Monitor->Width and Height will give the rotated dimesions.So this will trickle down + width( p_camera->Width() ), + height( p_camera->Height() ), + //width( (p_orientation==ROTATE_90||p_orientation==ROTATE_270)?p_camera->Height():p_camera->Width() ), + //height( (p_orientation==ROTATE_90||p_orientation==ROTATE_270)?p_camera->Width():p_camera->Height() ), orientation( (Orientation)p_orientation ), deinterlacing( p_deinterlacing ), label_coord( p_label_coord ),