Changeset 50216 in vbox for trunk/src/VBox/Main/src-server
- Timestamp:
- Jan 24, 2014 11:32:03 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/HostPower.cpp
r50175 r50216 36 36 AssertPtr(aVirtualBox); 37 37 mVirtualBox = aVirtualBox; 38 39 // keep this in sync with the host-specific implementations40 #if defined(RT_OS_WINDOWS) || defined(RT_OS_DARWIN)41 Bstr bstrValue;42 HRESULT hrc = mVirtualBox->GetExtraData(Bstr("HostPower/SavestateOnBatteryLow").raw(),43 bstrValue.asOutParam());44 if ( SUCCEEDED(hrc)45 && ( bstrValue.isEmpty()46 || bstrValue != "0"))47 {48 fSavestateOnBatteryLow = true;49 LogRel(("Power: BatteryLow event will trigger VM savestate\n"));50 }51 else52 #endif53 {54 fSavestateOnBatteryLow = false;55 LogRel(("Power: BatteryLow will be ignored\n"));56 }57 38 } 58 39 … … 142 123 case Reason_HostBatteryLow: 143 124 { 144 if (fSavestateOnBatteryLow) 125 Bstr value; 126 HRESULT hrc = mVirtualBox->GetExtraData(Bstr("VBoxInternal2/SavestateOnBatteryLow").raw(), 127 value.asOutParam()); 128 if ( SUCCEEDED(hrc) 129 && value != "0") 145 130 { 146 131 LogFunc(("BATTERY LOW -- savestate running VMs\n"));
Note:
See TracChangeset
for help on using the changeset viewer.