From 80d2f9f09823a4a2eea88a1a7da222b4c19cb69d Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 3 May 2021 14:19:34 -0400 Subject: [PATCH] Revert "Don't consult a Camera object to return colours and subpixelorder, we have those as members. Fixes crash in zms" This reverts commit 48f79da892001024f0d2cbc105176754c9509cf7. --- src/zm_monitor.cpp | 2 ++ src/zm_monitor.h | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index b6837e3e6..8ab6bb2d1 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -3030,6 +3030,8 @@ bool Monitor::DumpSettings(char *output, bool verbose) { return true; } // bool Monitor::DumpSettings(char *output, bool verbose) +unsigned int Monitor::Colours() const { return camera->Colours(); } +unsigned int Monitor::SubpixelOrder() const { return camera->SubpixelOrder(); } int Monitor::PrimeCapture() { int ret = camera->PrimeCapture(); diff --git a/src/zm_monitor.h b/src/zm_monitor.h index 5a5bccbbb..29299c66b 100644 --- a/src/zm_monitor.h +++ b/src/zm_monitor.h @@ -499,8 +499,8 @@ public: unsigned int Width() const { return width; } unsigned int Height() const { return height; } - unsigned int Colours() const { return colours; } - unsigned int SubpixelOrder() const { return subpixelorder; }; + unsigned int Colours() const; + unsigned int SubpixelOrder() const; int GetAudioFrequency() const { return shared_data ? shared_data->audio_frequency : -1; } int GetAudioChannels() const { return shared_data ? shared_data->audio_channels : -1; }