|
|
@ -916,7 +916,11 @@ bool HardwareInfo::suspend( suspend_type suspend ) {
|
|
|
|
if (suspend_states.suspend2disk && (suspend_states.suspend2disk_allowed != 0)) {
|
|
|
|
if (suspend_states.suspend2disk && (suspend_states.suspend2disk_allowed != 0)) {
|
|
|
|
if (rdevice->setPowerState(TDESystemPowerState::Hibernate)) {
|
|
|
|
if (rdevice->setPowerState(TDESystemPowerState::Hibernate)) {
|
|
|
|
calledSuspend.start();
|
|
|
|
calledSuspend.start();
|
|
|
|
|
|
|
|
handleResumeSignal(0);
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
handleResumeSignal(-1);
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if ( !suspend_states.suspend2disk )
|
|
|
|
if ( !suspend_states.suspend2disk )
|
|
|
@ -931,8 +935,10 @@ bool HardwareInfo::suspend( suspend_type suspend ) {
|
|
|
|
if (suspend_states.suspend2ram && (suspend_states.suspend2ram_allowed != 0)) {
|
|
|
|
if (suspend_states.suspend2ram && (suspend_states.suspend2ram_allowed != 0)) {
|
|
|
|
if (rdevice->setPowerState(TDESystemPowerState::Suspend)) {
|
|
|
|
if (rdevice->setPowerState(TDESystemPowerState::Suspend)) {
|
|
|
|
calledSuspend.start();
|
|
|
|
calledSuspend.start();
|
|
|
|
|
|
|
|
handleResumeSignal(0);
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
handleResumeSignal(-1);
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -948,8 +954,10 @@ bool HardwareInfo::suspend( suspend_type suspend ) {
|
|
|
|
if (suspend_states.standby && (suspend_states.standby_allowed != 0)) {
|
|
|
|
if (suspend_states.standby && (suspend_states.standby_allowed != 0)) {
|
|
|
|
if (rdevice->setPowerState(TDESystemPowerState::Standby)) {
|
|
|
|
if (rdevice->setPowerState(TDESystemPowerState::Standby)) {
|
|
|
|
calledSuspend.start();
|
|
|
|
calledSuspend.start();
|
|
|
|
|
|
|
|
handleResumeSignal(0);
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
handleResumeSignal(-1);
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|