@@ -41,6 +41,7 @@ public enum SplendidCommand : int
4141 Cinema = 25 ,
4242 Vivid = 13 ,
4343 Eyecare = 17 ,
44+ EReading = 212 ,
4445 Disabled = 18 ,
4546 }
4647 public static class VisualControl
@@ -168,6 +169,7 @@ public static Dictionary<SplendidCommand, string> GetVisualModes()
168169 { SplendidCommand . VivoVivid , "Vivid" } ,
169170 { SplendidCommand . VivoManual , "Manual" } ,
170171 { SplendidCommand . VivoEycare , "Eyecare" } ,
172+ { SplendidCommand . EReading , "E-Reading" } ,
171173 } ;
172174 }
173175
@@ -181,6 +183,7 @@ public static Dictionary<SplendidCommand, string> GetVisualModes()
181183 { SplendidCommand . Cinema , "Cinema" } ,
182184 { SplendidCommand . Vivid , "Vivid" } ,
183185 { SplendidCommand . Eyecare , "Eyecare" } ,
186+ { SplendidCommand . EReading , "E-Reading" } ,
184187 { SplendidCommand . Disabled , "Disabled" }
185188 } ;
186189 }
@@ -279,6 +282,7 @@ public static void SetVisual(SplendidCommand mode = SplendidCommand.Default, int
279282 //if (whiteBalance != DefaultColorTemp && !init) ProcessHelper.RunAsAdmin();
280283
281284 int ? balance = null ;
285+ int ? eReading = null ;
282286 int command = 0 ;
283287
284288 switch ( mode )
@@ -296,12 +300,16 @@ public static void SetVisual(SplendidCommand mode = SplendidCommand.Default, int
296300 case SplendidCommand . VivoEycare :
297301 balance = Math . Abs ( whiteBalance - 50 ) * 4 / 50 ;
298302 break ;
303+ case SplendidCommand . EReading :
304+ balance = whiteBalance ;
305+ eReading = 2 ;
306+ break ;
299307 default :
300308 balance = whiteBalance ;
301309 break ;
302310 }
303311
304- int result = RunSplendid ( mode , command , balance ) ;
312+ int result = RunSplendid ( mode , command , balance , eReading ) ;
305313 if ( result == 0 ) return ;
306314 if ( result == - 1 )
307315 {
@@ -347,7 +355,7 @@ private static string GetSplendidPath()
347355 return _splendidPath ;
348356 }
349357
350- private static int RunSplendid ( SplendidCommand command , int ? param1 = null , int ? param2 = null )
358+ private static int RunSplendid ( SplendidCommand command , int ? param1 = null , int ? param2 = null , int ? param3 = null )
351359 {
352360 string splendidPath = GetSplendidPath ( ) ;
353361 string splendidExe = $ "{ splendidPath } \\ AsusSplendid.exe";
@@ -356,7 +364,7 @@ private static int RunSplendid(SplendidCommand command, int? param1 = null, int?
356364
357365 if ( isSplenddid )
358366 {
359- var result = ProcessHelper . RunCMD ( splendidExe , ( int ) command + " " + param1 + " " + param2 , splendidPath ) ;
367+ var result = ProcessHelper . RunCMD ( splendidExe , ( int ) command + " " + param1 + " " + param2 + " " + param3 , splendidPath ) ;
360368 if ( result . Contains ( "file not exist" ) || ( result . Length == 0 && ! isVivo ) ) return 1 ;
361369 if ( result . Contains ( "return code: -1" ) ) return - 1 ;
362370 if ( result . Contains ( "Visual is disabled" ) )
0 commit comments