File tree 1 file changed +10
-4
lines changed
1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
2
MIT License
3
- Copyright (C) 2022 DUONG DIEU PHAP
3
+ Copyright (C) 2022-2024 DUONG DIEU PHAP
4
4
Project & license info: https://github.com/d2phap/DXControl
5
5
*/
6
6
using DirectN ;
@@ -506,14 +506,20 @@ private void Ticker_Tick(object? sender, VerticalBlankTickerEventArgs e)
506
506
507
507
private void Ticker_WaitError ( object ? sender , VerticalBlankTickerErrorEventArgs e )
508
508
{
509
- const uint UNKNOWN_ERROR = 0xc01e0006 ;
510
509
const uint WAIT_TIMEOUT = 258 ;
511
510
511
+ // Win Server 2019: Unknown Error https://github.com/d2phap/ImageGlass/issues/1771
512
+ const uint UNKNOWN_ERROR_WinSrv2019 = 0xc000000d ;
513
+
512
514
// happens when the screen is off, we handle this error and put the thread
513
515
// into sleep so that it will auto-recover when the screen is on again
514
516
// https://github.com/smourier/DirectN/issues/29
515
- if ( e . Error == unchecked ( ( int ) UNKNOWN_ERROR )
516
- || e . Error == WAIT_TIMEOUT )
517
+ const uint UNKNOWN_ERROR = 0xc01e0006 ;
518
+
519
+
520
+ if ( e . Error == WAIT_TIMEOUT
521
+ || e . Error == unchecked ( ( int ) UNKNOWN_ERROR )
522
+ || e . Error == unchecked ( ( int ) UNKNOWN_ERROR_WinSrv2019 ) )
517
523
{
518
524
Thread . Sleep ( 1000 ) ;
519
525
e . Handled = true ;
You can’t perform that action at this time.
0 commit comments