From c22a96c52f33ed21606a249bfe387e06bee45389 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 7 Apr 2019 00:54:12 +0200 Subject: [PATCH] gui/osd_helpers.cpp/h: add signal OnAfterChangeResolution Adds possibility to use any methods after changed resolution without any changes on COsdHelpers class. Implementation is possible directly from other objects that need this. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/cfdd351ceb5f571c001ad96ebfd15bb43a182fc0 Author: Thilo Graf Date: 2019-04-07 (Sun, 07 Apr 2019) ------------------ This commit was generated by Migit --- src/gui/osd_helpers.cpp | 1 + src/gui/osd_helpers.h | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/osd_helpers.cpp b/src/gui/osd_helpers.cpp index 57a391360..d54716dd7 100644 --- a/src/gui/osd_helpers.cpp +++ b/src/gui/osd_helpers.cpp @@ -123,6 +123,7 @@ void COsdHelpers::changeOsdResolution(uint32_t mode, bool automode/*=false*/, bo CNeutrinoApp::getInstance()->StartSubtitles(); } } + OnAfterChangeResolution(); } #else void COsdHelpers::changeOsdResolution(uint32_t, bool, bool) diff --git a/src/gui/osd_helpers.h b/src/gui/osd_helpers.h index 9c78886f0..1815b29de 100644 --- a/src/gui/osd_helpers.h +++ b/src/gui/osd_helpers.h @@ -2,12 +2,14 @@ #ifndef __osd_helpers__ #define __osd_helpers__ +#include + enum { OSDMODE_720 = 0, OSDMODE_1080 = 1 }; -class COsdHelpers +class COsdHelpers : public sigc::trackable { private: @@ -23,6 +25,7 @@ class COsdHelpers int getVideoSystem(); uint32_t getOsdResolution(); int setVideoSystem(int newSystem, bool remember = true); + sigc::signal OnAfterChangeResolution; };