Hi,
auch eine Möglichkeit, aber durch meinen Spieltrieb wechselt das öfters mal, deshalb hätte ich es gerne unabhängig von der Umgebung.
Ich habe jetzt einfach einen Schalter in SofthdDevice eingebaut, mit dem man das Suspend Verhalten ändern kann. Wobei ich mir frage was eigentlich genau der Unterschied zwischen Detach und Suspend mit Audio/Video-Deaktivieren ist.
Wäre schön wenn das so, oder so ähnlich mal in den offiziellen Paketen landet:
--- softhddevice.cpp 2014-05-30 10:18:20.000000000 +0200
+++ softhddevice.cpp_detachfrommenu 2014-05-31 17:56:22.000000000 +0200
@@ -79,6 +79,7 @@
static char ConfigMakePrimary; ///< config primary wanted
static char ConfigHideMainMenuEntry; ///< config hide main menu entry
+static char ConfigDetachFromMainMenu; ///< detach from main menu entry instead of suspend
static char ConfigSuspendClose; ///< suspend should close devices
static char ConfigSuspendX11; ///< suspend should stop x11
@@ -597,6 +598,7 @@
int General;
int MakePrimary;
int HideMainMenuEntry;
+ int DetachFromMainMenu;
int OsdSize;
int OsdWidth;
int OsdHeight;
@@ -763,6 +765,8 @@
trVDR("no"), trVDR("yes")));
Add(new cMenuEditBoolItem(tr("Hide main menu entry"),
&HideMainMenuEntry, trVDR("no"), trVDR("yes")));
+ Add(new cMenuEditBoolItem(tr("Detach from main menu entry"),
+ &DetachFromMainMenu, trVDR("no"), trVDR("yes")));
//
// osd
//
@@ -997,6 +1001,7 @@
General = 0;
MakePrimary = ConfigMakePrimary;
HideMainMenuEntry = ConfigHideMainMenuEntry;
+ DetachFromMainMenu = ConfigDetachFromMainMenu;
//
// osd
//
@@ -1110,6 +1115,8 @@
SetupStore("MakePrimary", ConfigMakePrimary = MakePrimary);
SetupStore("HideMainMenuEntry", ConfigHideMainMenuEntry =
HideMainMenuEntry);
+ SetupStore("DetachFromMainMenu", ConfigDetachFromMainMenu =
+ DetachFromMainMenu);
switch (OsdSize) {
case 0:
OsdWidth = 0;
@@ -1768,7 +1775,12 @@
Clear(); // clear the menu
SetHasHotkeys();
- Add(new cOsdItem(hk(tr("Suspend SoftHdDevice")), osUser1));
+
+ if (ConfigDetachFromMainMenu) {
+ Add(new cOsdItem(hk(tr("Detach SoftHdDevice")), osUser1));
+ }else{
+ Add(new cOsdItem(hk(tr("Suspend SoftHdDevice")), osUser1));
+}
#ifdef USE_PIP
if (PipReceiver) {
Add(new cOsdItem(hk(tr("PIP toggle on/off: off")), osUser2));
@@ -2016,9 +2028,13 @@
if (SuspendMode == NOT_SUSPENDED && !cSoftHdControl::Player) {
cControl::Launch(new cSoftHdControl);
cControl::Attach();
- Suspend(ConfigSuspendClose, ConfigSuspendClose,
- ConfigSuspendX11);
- SuspendMode = SUSPEND_NORMAL;
+ if (ConfigDetachFromMainMenu) {
+ Suspend(1, 1, 0);
+ SuspendMode = SUSPEND_DETACHED;
+ }else{
+ Suspend(ConfigSuspendClose, ConfigSuspendClose, ConfigSuspendX11);
+ SuspendMode = SUSPEND_NORMAL;
+ }
if (ShutdownHandler.GetUserInactiveTime()) {
dsyslog("[softhddev]%s: set user inactive\n",
__FUNCTION__);
@@ -2841,6 +2857,10 @@
ConfigHideMainMenuEntry = atoi(value);
return true;
}
+ if (!strcasecmp(name, "DetachFromMainMenu")) {
+ ConfigDetachFromMainMenu = atoi(value);
+ return true;
+ }
if (!strcasecmp(name, "Osd.Width")) {
ConfigOsdWidth = atoi(value);
VideoSetOsdSize(ConfigOsdWidth, ConfigOsdHeight);
Display More
gruß red