File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 11/*
22MIT License
3- Copyright (C) 2022 DUONG DIEU PHAP
3+ Copyright (C) 2022-2024 DUONG DIEU PHAP
44Project & license info: https://github.com/d2phap/DXControl
55*/
66using DirectN ;
@@ -506,14 +506,20 @@ private void Ticker_Tick(object? sender, VerticalBlankTickerEventArgs e)
506506
507507 private void Ticker_WaitError ( object ? sender , VerticalBlankTickerErrorEventArgs e )
508508 {
509- const uint UNKNOWN_ERROR = 0xc01e0006 ;
510509 const uint WAIT_TIMEOUT = 258 ;
511510
511+ // Win Server 2019: Unknown Error https://github.com/d2phap/ImageGlass/issues/1771
512+ const uint UNKNOWN_ERROR_WinSrv2019 = 0xc000000d ;
513+
512514 // happens when the screen is off, we handle this error and put the thread
513515 // into sleep so that it will auto-recover when the screen is on again
514516 // 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 ) )
517523 {
518524 Thread . Sleep ( 1000 ) ;
519525 e . Handled = true ;
You can’t perform that action at this time.
0 commit comments