diff options
author | Johns <johns98@gmx.net> | 2012-03-02 00:22:08 +0100 |
---|---|---|
committer | Johns <johns98@gmx.net> | 2012-03-02 00:22:08 +0100 |
commit | db258a0fbd197157d8273e6e85d8da7ea15ee39f (patch) | |
tree | 4b7e889a6a3dfad3d5ad3e7034b824c72a080f13 | |
parent | 0df8e8a5fc5473eee0e427dd5acfe81e3668a5a4 (diff) | |
download | vdr-plugin-softhddevice-db258a0fbd197157d8273e6e85d8da7ea15ee39f.tar.gz vdr-plugin-softhddevice-db258a0fbd197157d8273e6e85d8da7ea15ee39f.tar.bz2 |
Detach/Attach on MakePrimaryDevice.
-rw-r--r-- | softhddevice.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/softhddevice.cpp b/softhddevice.cpp index 3ccce1c..c16d2c7 100644 --- a/softhddevice.cpp +++ b/softhddevice.cpp @@ -927,6 +927,13 @@ void cSoftHdDevice::MakePrimaryDevice(bool on) cDevice::MakePrimaryDevice(on); if (on) { new cSoftOsdProvider(); + if (SuspendMode == SUSPEND_DETACHED) { + Resume(); + SuspendMode = 0; + } + } else if (!SuspendMode) { + Suspend(1, 1, 0); + SuspendMode = SUSPEND_DETACHED; } } @@ -1698,6 +1705,7 @@ cString cPluginSoftHdDevice::SVDRPCommand(const char *command, return "can't suspend SoftHdDevice already suspended"; } Suspend(1, 1, 0); + SuspendMode = SUSPEND_DETACHED; cControl::Launch(new cSoftHdControl); cControl::Attach(); return "SoftHdDevice is detached"; |