mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Darktheme fix https://github.com/seerge/g-helper/issues/1092
ACPI modes support for Vivobook https://github.com/seerge/g-helper/issues/1089
This commit is contained in:
@@ -1,8 +1,19 @@
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Collections;
|
||||
using System.Runtime.InteropServices;
|
||||
using static GHelper.Display.ScreenInterrogatory;
|
||||
|
||||
namespace GHelper.Display
|
||||
{
|
||||
|
||||
class ScreenComparer : IComparer
|
||||
{
|
||||
public int Compare(object x, object y)
|
||||
{
|
||||
int displayX = Int32.Parse(((Screen)x).DeviceName.Replace(@"\\.\DISPLAY", ""));
|
||||
int displayY = Int32.Parse(((Screen)y).DeviceName.Replace(@"\\.\DISPLAY", ""));
|
||||
return (new CaseInsensitiveComparer()).Compare(displayX, displayY);
|
||||
}
|
||||
}
|
||||
internal class ScreenNative
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
|
||||
@@ -166,6 +177,8 @@ namespace GHelper.Display
|
||||
count++;
|
||||
}
|
||||
|
||||
Array.Sort(screens, new ScreenComparer());
|
||||
|
||||
count = 0;
|
||||
foreach (var screen in screens)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user