mirror of
https://projects.vdr-developer.org/git/vdr-plugin-softhddevice.git
synced 2023-10-10 19:16:51 +02:00
Detach/Attach on MakePrimaryDevice.
This commit is contained in:
parent
0df8e8a5fc
commit
db258a0fbd
@ -927,6 +927,13 @@ void cSoftHdDevice::MakePrimaryDevice(bool on)
|
|||||||
cDevice::MakePrimaryDevice(on);
|
cDevice::MakePrimaryDevice(on);
|
||||||
if (on) {
|
if (on) {
|
||||||
new cSoftOsdProvider();
|
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";
|
return "can't suspend SoftHdDevice already suspended";
|
||||||
}
|
}
|
||||||
Suspend(1, 1, 0);
|
Suspend(1, 1, 0);
|
||||||
|
SuspendMode = SUSPEND_DETACHED;
|
||||||
cControl::Launch(new cSoftHdControl);
|
cControl::Launch(new cSoftHdControl);
|
||||||
cControl::Attach();
|
cControl::Attach();
|
||||||
return "SoftHdDevice is detached";
|
return "SoftHdDevice is detached";
|
||||||
|
Loading…
Reference in New Issue
Block a user