Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

Commit

Permalink
minor correction
Browse files Browse the repository at this point in the history
for clarity
  • Loading branch information
A9G-Data-Droid committed May 12, 2020
1 parent 65a539b commit a4e77f8
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions CenterTaskbar/DisplaySettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@ internal static class DisplaySettings
const int ENUM_CURRENT_SETTINGS = -1;
const int ENUM_REGISTRY_SETTINGS = -2;

[StructLayout(LayoutKind.Sequential)]
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
private struct DEVMODE
{

private const int CCHDEVICENAME = 0x20;
private const int CCHFORMNAME = 0x20;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 0x20)]
private const int CCHDEVICENAME = 32;
private const int CCHFORMNAME = 32;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = CCHDEVICENAME)]
public string dmDeviceName;
public short dmSpecVersion;
public short dmDriverVersion;
Expand All @@ -33,7 +32,7 @@ private struct DEVMODE
public short dmYResolution;
public short dmTTOption;
public short dmCollate;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 0x20)]
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = CCHFORMNAME)]
public string dmFormName;
public short dmLogPixels;
public int dmBitsPerPel;
Expand All @@ -49,7 +48,6 @@ private struct DEVMODE
public int dmReserved2;
public int dmPanningWidth;
public int dmPanningHeight;

}

//public static void ListAllDisplayModes()
Expand Down

0 comments on commit a4e77f8

Please sign in to comment.