diff options
Diffstat (limited to 'dxr3device.c')
-rw-r--r-- | dxr3device.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/dxr3device.c b/dxr3device.c index 1f8be19..02773bb 100644 --- a/dxr3device.c +++ b/dxr3device.c @@ -68,6 +68,9 @@ cDxr3Device::cDxr3Device() : spuDecoder(NULL), pluginOn(true), vPts(0), scrSet(f audioOut->openDevice(); aDecoder = new cDxr3AudioDecoder(); + + // register observer + cSettings::instance()->registerObserver(this); } cDxr3Device::~cDxr3Device() @@ -457,6 +460,18 @@ int cDxr3Device::ossSetPlayMode(uint32_t mode) return ioctl(fdControl, EM8300_IOCTL_SET_AUDIOMODE, &mode); } +void cDxr3Device::settingsChange(SettingsChange change) +{ + if (change == BCS) { + // update bcs value + bcs.brightness = cSettings::instance()->brightness(); + bcs.contrast = cSettings::instance()->contrast(); + bcs.saturation = cSettings::instance()->saturation(); + + CHECK(ioctl(fdControl, EM8300_IOCTL_SETBCS, &bcs)); + } +} + void cDxr3Device::claimDevices() { // open control stream |