diff options
Diffstat (limited to 'win/C#/frmMain.cs')
-rw-r--r-- | win/C#/frmMain.cs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index 6937c5923..4cf0483ec 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -351,12 +351,20 @@ namespace Handbrake private void encodeStarted(object sender, EventArgs e)
{
+ if (Properties.Settings.Default.preventSleep)
+ {
+ Win32.PreventSleep();
+ }
SetEncodeStarted();
encodeQueue.EncodeStatusChanged += EncodeQueue_EncodeStatusChanged;
}
private void encodeEnded(object sender, EventArgs e)
{
+ if (Properties.Settings.Default.preventSleep)
+ {
+ Win32.AllowSleep();
+ }
encodeQueue.EncodeStatusChanged -= EncodeQueue_EncodeStatusChanged;
SetEncodeFinished();
}
|