mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Visual Modes
This commit is contained in:
@@ -1,14 +1,25 @@
|
||||
using GHelper.Helpers;
|
||||
using GHelper.Mode;
|
||||
using GHelper.USB;
|
||||
using System.Management;
|
||||
|
||||
namespace GHelper.Display
|
||||
{
|
||||
enum SplendidCommand: int
|
||||
public enum SplendidCommand: int
|
||||
{
|
||||
Init = 10,
|
||||
DimmingAsus = 9,
|
||||
DimmingVisual = 19
|
||||
DimmingVisual = 19,
|
||||
GamutMode = 200,
|
||||
|
||||
Default = 11,
|
||||
Racing = 21,
|
||||
Scenery = 22,
|
||||
RTS = 23,
|
||||
FPS = 24,
|
||||
Cinema = 25,
|
||||
Vivid = 13,
|
||||
Eyecare = 17,
|
||||
}
|
||||
|
||||
public static class ScreenControl
|
||||
@@ -24,10 +35,56 @@ namespace GHelper.Display
|
||||
|
||||
private static System.Timers.Timer brightnessTimer = new System.Timers.Timer(100);
|
||||
|
||||
|
||||
static ScreenControl () {
|
||||
brightnessTimer.Elapsed += BrightnessTimerTimer_Elapsed;
|
||||
}
|
||||
|
||||
|
||||
public static Dictionary<int, string> GetGamutModes ()
|
||||
{
|
||||
Dictionary<int, string> _modes = new Dictionary<int, string>();
|
||||
|
||||
DirectoryInfo d = new DirectoryInfo("C:\\ProgramData\\ASUS\\GameVisual");
|
||||
FileInfo[] icms = d.GetFiles("*.icm");
|
||||
|
||||
if (icms.Length == 0) return _modes;
|
||||
|
||||
_modes.Add(50, "Native");
|
||||
foreach (FileInfo icm in icms)
|
||||
{
|
||||
if (icm.Name.Contains("sRGB")) _modes.Add(51, "sRGB");
|
||||
if (icm.Name.Contains("DCIP3")) _modes.Add(53, "DCIP3");
|
||||
if (icm.Name.Contains("DisplayP3")) _modes.Add(54, "DisplayP3");
|
||||
}
|
||||
return _modes;
|
||||
}
|
||||
|
||||
public static Dictionary<SplendidCommand, string> GetVisualModes()
|
||||
{
|
||||
return new Dictionary<SplendidCommand, string>
|
||||
{
|
||||
{ SplendidCommand.Default, "Default"},
|
||||
{ SplendidCommand.Racing, "Racing"},
|
||||
{ SplendidCommand.Scenery, "Scenery"},
|
||||
{ SplendidCommand.RTS, "RTS/RPG"},
|
||||
{ SplendidCommand.FPS, "FPS"},
|
||||
{ SplendidCommand.Cinema, "Cinema"},
|
||||
{ SplendidCommand.Vivid, "Vivid" },
|
||||
{ SplendidCommand.Eyecare, "Eyecare"}
|
||||
};
|
||||
}
|
||||
|
||||
public static void SetGamut(int mode = 50)
|
||||
{
|
||||
RunSplendid(SplendidCommand.GamutMode, 0, mode);
|
||||
}
|
||||
|
||||
public static void SetVisual(SplendidCommand mode = SplendidCommand.Default)
|
||||
{
|
||||
RunSplendid(mode, 0, 50);
|
||||
}
|
||||
|
||||
private static string GetSplendidPath()
|
||||
{
|
||||
if (_splendidPath == null)
|
||||
|
||||
Reference in New Issue
Block a user