diff options
author | phintuka <phintuka> | 2010-06-02 10:26:21 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2010-06-02 10:26:21 +0000 |
commit | a1345b4b30d30654bfa358df88a8bbfbb9c8948a (patch) | |
tree | 6db90751e15707801cf74b7a069fb2b413df02ec | |
parent | 0f18cc3b9c2cd24c5602e5757a1532fe043a5a23 (diff) | |
download | xineliboutput-a1345b4b30d30654bfa358df88a8bbfbb9c8948a.tar.gz xineliboutput-a1345b4b30d30654bfa358df88a8bbfbb9c8948a.tar.bz2 |
ForcePrimaryDevice(): return true if switching is possible or we're currently the primary device
-rw-r--r-- | device.c | 7 | ||||
-rw-r--r-- | device.h | 4 |
2 files changed, 7 insertions, 4 deletions
@@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: device.c,v 1.110 2010-06-02 10:19:18 phintuka Exp $ + * $Id: device.c,v 1.111 2010-06-02 10:26:21 phintuka Exp $ * */ @@ -333,13 +333,16 @@ void cXinelibDevice::MakePrimaryDevice(bool On) new cXinelibOsdProvider(this); } -void cXinelibDevice::ForcePrimaryDevice(bool On) +bool cXinelibDevice::ForcePrimaryDevice(bool On) { TRACEF("cXinelibDevice::ForcePrimaryDevice"); m_MainThreadLock.Lock(); m_MainThreadFunctors.Add(CreateFunctor(this, &cXinelibDevice::ForcePrimaryDeviceImpl, On)); m_MainThreadLock.Unlock(); + + return xc.force_primary_device || + (cDevice::PrimaryDevice() && this == cDevice::PrimaryDevice()); } void cXinelibDevice::ForcePrimaryDeviceImpl(bool On) @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: device.h,v 1.58 2010-03-15 12:50:29 phintuka Exp $ + * $Id: device.h,v 1.59 2010-06-02 10:26:21 phintuka Exp $ * */ @@ -81,7 +81,7 @@ class cXinelibDevice : public cDevice public: virtual void MakePrimaryDevice(bool On); - void ForcePrimaryDevice(bool On); + bool ForcePrimaryDevice(bool On); // Device capabilities |