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.
This commit is contained in:
2019-04-06 23:20:29 +02:00
parent 2041ba7d54
commit 86f0798f63
2 changed files with 5 additions and 1 deletions

View File

@@ -123,6 +123,7 @@ void COsdHelpers::changeOsdResolution(uint32_t mode, bool automode/*=false*/, bo
CNeutrinoApp::getInstance()->StartSubtitles(); CNeutrinoApp::getInstance()->StartSubtitles();
} }
} }
OnAfterChangeResolution();
} }
#else #else
void COsdHelpers::changeOsdResolution(uint32_t, bool, bool) void COsdHelpers::changeOsdResolution(uint32_t, bool, bool)

View File

@@ -2,12 +2,14 @@
#ifndef __osd_helpers__ #ifndef __osd_helpers__
#define __osd_helpers__ #define __osd_helpers__
#include <sigc++/signal.h>
enum { enum {
OSDMODE_720 = 0, OSDMODE_720 = 0,
OSDMODE_1080 = 1 OSDMODE_1080 = 1
}; };
class COsdHelpers class COsdHelpers : public sigc::trackable
{ {
private: private:
@@ -23,6 +25,7 @@ class COsdHelpers
int getVideoSystem(); int getVideoSystem();
uint32_t getOsdResolution(); uint32_t getOsdResolution();
int setVideoSystem(int newSystem, bool remember = true); int setVideoSystem(int newSystem, bool remember = true);
sigc::signal<void> OnAfterChangeResolution;
}; };