summaryrefslogtreecommitdiff
path: root/src/lib/cross_windows.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-10-08 23:46:21 +0200
committerCarl Hetherington <cth@carlh.net>2025-10-10 21:13:04 +0200
commitc39eb25116392813e064c963a9bce014e92805b3 (patch)
treee7cf32c442018aa9611dd270d58f95471da57ef7 /src/lib/cross_windows.cc
parent81137ff8b9ea1ac55f973df11d55bcae56c1ee02 (diff)
Allow Waker to keep different things awake for different reasons.
Diffstat (limited to 'src/lib/cross_windows.cc')
-rw-r--r--src/lib/cross_windows.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/cross_windows.cc b/src/lib/cross_windows.cc
index 29b16c715..2076f3928 100644
--- a/src/lib/cross_windows.cc
+++ b/src/lib/cross_windows.cc
@@ -256,11 +256,12 @@ void
Waker::nudge()
{
boost::mutex::scoped_lock lm(_mutex);
- SetThreadExecutionState(ES_SYSTEM_REQUIRED);
+ SetThreadExecutionState(_reason == Reason::ENCODING ? ES_SYSTEM_REQUIRED : ES_DISPLAY_REQUIRED);
}
-Waker::Waker()
+Waker::Waker(Reason reason)
+ : _reason(reason)
{
}