mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Flicker-free dimming slider for OLED models (#2109)
* Gamma Init * Cleanup * Show flicker-free dimming only on supported models * Gamma ramp tweaks * Gamma improvements * Stronger dimming * Added OLED model detection
This commit is contained in:
@@ -32,6 +32,16 @@ namespace GHelper.Display
|
||||
}
|
||||
internal class ScreenNative
|
||||
{
|
||||
|
||||
[DllImport("gdi32", CharSet = CharSet.Unicode)]
|
||||
internal static extern IntPtr CreateDC(string driver, string device, string port, IntPtr deviceMode);
|
||||
|
||||
[DllImport("gdi32")]
|
||||
internal static extern bool SetDeviceGammaRamp(IntPtr dcHandle, ref GammaRamp ramp);
|
||||
|
||||
[DllImport("gdi32")]
|
||||
internal static extern bool GetDeviceGammaRamp(IntPtr dcHandle, ref GammaRamp ramp);
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
|
||||
public struct DEVMODE
|
||||
{
|
||||
@@ -146,7 +156,7 @@ namespace GHelper.Display
|
||||
public const string defaultDevice = @"\\.\DISPLAY1";
|
||||
|
||||
|
||||
private static string? FindInternalName(bool log = false)
|
||||
public static string? FindInternalName(bool log = false)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user