diff options
| author | Erik Kundiman <erik@megapahit.org> | 2026-09-22 14:47:19 +0800 |
|---|---|---|
| committer | Erik Kundiman <erik@megapahit.org> | 2026-09-22 14:47:19 +0800 |
| commit | 8557e9659ca5b71aabcbb21758be03a959c2098d (patch) | |
| tree | e9c2cb659b646169e8d0c502b0ff873fec05ac02 /indra/newview/llappviewerwin32.cpp | |
| parent | 235a9d87ecf0447bd4aca3287548c715f1ada2ad (diff) | |
| parent | f767219366b8dbaeea95a22bd9953a587f473298 (diff) | |
Merge tag 'Second_Life_Release#f7672193-26.4' into 26.4
Diffstat (limited to 'indra/newview/llappviewerwin32.cpp')
| -rw-r--r-- | indra/newview/llappviewerwin32.cpp | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index 77f00b05f3..01ea24d211 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -1070,56 +1070,6 @@ bool LLAppViewerWin32::sendURLToOtherInstance(const std::string& url) return false; } -void LLAppViewerWin32::setOSHibernationMode(eHibernationMode mode) -{ - // ES_CONTINUOUS tells Windows to reset the idle timer - // and restore normal operation - // ES_SYSTEM_REQUIRED prevents system sleep/hibernation - // ES_DISPLAY_REQUIRED prevents display sleep - - if (mode == LL_HIBERNATE_MODE_DEFAULT) - { - // Allow OS to hibernate - clear the previous execution state flags - // ES_CONTINUOUS without other flags allows the system to idle normally - SetThreadExecutionState(ES_CONTINUOUS); - LL_INFOS("OS") << "Permitted OS hibernation/sleep" << LL_ENDL; - } - else if (mode == LL_HIBERNATE_MODE_PREVENT) - { - // Prevent OS from hibernating while viewer is running - // ES_CONTINUOUS | ES_SYSTEM_REQUIRED keeps the system awake - EXECUTION_STATE result = SetThreadExecutionState( - ES_CONTINUOUS | ES_SYSTEM_REQUIRED - ); - if (result == NULL) - { - LL_WARNS("OS") << "Failed to prevent OS hibernation, error: " << GetLastError() << LL_ENDL; - } - else - { - LL_INFOS("OS") << "Prevented OS hibernation, but allowed display sleep" << LL_ENDL; - } - } - else if (mode == LL_HIBERNATE_MODE_PREVENT_SCREEN) - { - // Prevent OS from hibernating or turning screen off while viewer is running - // ES_CONTINUOUS | ES_SYSTEM_REQUIRED keeps the system awake - // ES_DISPLAY_REQUIRED keeps the display on - EXECUTION_STATE result = SetThreadExecutionState( - ES_CONTINUOUS | ES_SYSTEM_REQUIRED | ES_DISPLAY_REQUIRED - ); - - if (result == NULL) - { - LL_WARNS("OS") << "Failed to prevent OS hibernation and display sleep, error: " << GetLastError() << LL_ENDL; - } - else - { - LL_INFOS("OS") << "Prevented OS hibernation/sleep" << LL_ENDL; - } - } -} - bool LLAppViewerWin32::sendShutdownToOtherInstances(const std::wstring& install_dir) { // Velopack installs viewer like this: |
