vdr-plugin-skindesigner/displayvolume.c

27 lines
548 B
C
Raw Normal View History

2014-09-27 09:25:14 +02:00
#include "displayvolume.h"
#include "config.h"
2016-01-26 18:32:38 +01:00
cSDDisplayVolume::cSDDisplayVolume(cViewVolume *volumeView) {
view = volumeView;
ok = view->Init();
if (!ok)
esyslog("skindesigner: Error initiating displayvolume view - aborting");
2014-09-27 09:25:14 +02:00
}
cSDDisplayVolume::~cSDDisplayVolume() {
2016-01-26 18:32:38 +01:00
view->Close();
2014-09-27 09:25:14 +02:00
}
void cSDDisplayVolume::SetVolume(int Current, int Total, bool Mute) {
2016-01-26 18:32:38 +01:00
if (!ok)
2014-09-27 09:25:14 +02:00
return;
2016-01-26 18:32:38 +01:00
view->SetVolume(Current, Total, Mute);
2014-09-27 09:25:14 +02:00
}
void cSDDisplayVolume::Flush(void) {
2016-01-26 18:32:38 +01:00
if (!ok)
2014-09-27 09:25:14 +02:00
return;
2016-01-26 18:32:38 +01:00
view->Flush();
2014-09-27 09:25:14 +02:00
}