From 2c52955ac0536c7b31b75f98fa44768050c1d809 Mon Sep 17 00:00:00 2001 From: Johns Date: Sat, 14 Apr 2012 21:16:01 +0200 Subject: Adds detached start mode. --- softhddevice.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'softhddevice.cpp') diff --git a/softhddevice.cpp b/softhddevice.cpp index a9c19a8..a707516 100644 --- a/softhddevice.cpp +++ b/softhddevice.cpp @@ -1537,10 +1537,18 @@ bool cPluginSoftHdDevice::Start(void) } } - if (!::Start()) { - cControl::Launch(new cSoftHdControl); - cControl::Attach(); - SuspendMode = SUSPEND_NORMAL; + switch (::Start()) { + case 1: + cControl::Launch(new cSoftHdControl); + cControl::Attach(); + SuspendMode = SUSPEND_NORMAL; + break; + case -1: + SuspendMode = SUSPEND_DETACHED; + break; + case 0: + default: + break; } return true; -- cgit v1.2.3