From f767219366b8dbaeea95a22bd9953a587f473298 Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy <118752495+marchcat@users.noreply.github.com> Date: Thu, 17 Sep 2026 23:52:56 +0300 Subject: Revert #5856 OS hibernation prevention (#6340) --- indra/newview/llappviewer.cpp | 42 ------------------------------------------ 1 file changed, 42 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 139f8dd426..3e715ecf93 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -642,12 +642,6 @@ bool LLAppViewer::sendURLToOtherInstance(const std::string& url) return false; } -//virtual -void LLAppViewer::setOSHibernationMode(eHibernationMode mode) -{ - // See OS specific files -} - //---------------------------------------------------------------------------- // LLAppViewer definition @@ -5993,30 +5987,6 @@ void LLAppViewer::outOfMemorySoftQuit() } } -void LLAppViewer::setPermitOSHibernation(bool permit) -{ - if (permit) - { - if (mCurrentHibernationMode != LL_HIBERNATE_MODE_DEFAULT) - { - // Will call OS specific code to let OS hibernate when idle - setOSHibernationMode(LL_HIBERNATE_MODE_DEFAULT); - mCurrentHibernationMode = LL_HIBERNATE_MODE_DEFAULT; - } - } - else - { - // User is active, check settings and set OS hibernation mode accordingly - static LLCachedControl os_hibernation_mode(gSavedSettings, "OSHibernationMode", 0); - eHibernationMode mode = static_cast(os_hibernation_mode()); - if (mCurrentHibernationMode != mode) - { - setOSHibernationMode(mode); - mCurrentHibernationMode = mode; - } - } -} - void LLAppViewer::idleNameCache() { // Neither old nor new name cache can function before agent has a region @@ -6224,9 +6194,6 @@ void LLAppViewer::disconnectViewer() // Pass the connection state to LLUrlEntryParcel not to attempt // parcel info requests while disconnected. LLUrlEntryParcel::setDisconnected(gDisconnected); - - // Restore default OS hibernation mode - setPermitOSHibernation(true); } void LLAppViewer::forceErrorLLError() @@ -6518,15 +6485,6 @@ void LLAppViewer::handleLoginComplete() // we logged in successfully, so save settings on logout LL_INFOS() << "Login successful, per account settings will be saved on log out." << LL_ENDL; mSavePerAccountSettings=true; - - // Don't allow hibernation while we're running - setPermitOSHibernation(false); - // Track 'hibernation' mode changes - mOSHibernationModeChangeConnection = gSavedSettings.getControl("OSHibernationMode")->getSignal()->connect([](LLControlVariable* control, const LLSD& new_val, const LLSD& old_val) - { - // setPermitOSHibernation will sort itself out based on new mode. - LLAppViewer::instance()->setPermitOSHibernation(false); - }); } //virtual -- cgit v1.3