Skip to content

Commit

Permalink
Internal screen can also be connected with displayport embeeded conne…
Browse files Browse the repository at this point in the history
…ction.
  • Loading branch information
BartoszCichecki committed Dec 21, 2021
1 parent 31b369e commit 36102f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions LenovoLegionToolkit.Lib/Features/RefreshRateFeature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,13 @@ private static bool IsInternal(Display display)
.Take(2)
.Aggregate((s1, s2) => s1 + "\\" + s2);

var outputTechnology = WMI.Read("root\\WMI",
var vot = WMI.Read("root\\WMI",
$"SELECT * FROM WmiMonitorConnectionParams WHERE InstanceName LIKE '%{instanceName}%'",
pdc => (uint)pdc["VideoOutputTechnology"].Value).FirstOrDefault();

return outputTechnology == 0x80000000; // D3DKMDT_VOT_INTERNAL
const uint votInternal = 0x80000000;
const uint votDisplayPortEmbedded = 11;
return vot == votInternal || vot == votDisplayPortEmbedded;
}

private static bool Match(DisplayPossibleSetting dps, DisplaySetting ds)
Expand Down
4 changes: 2 additions & 2 deletions LenovoLegionToolkit.Lib/Listeners/KeyListener.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
namespace LenovoLegionToolkit.Lib.Listeners
{
public class KeyListener: AbstractWMIListener<Key>
public class KeyListener : AbstractWMIListener<Key>
{
public KeyListener(): base("LENOVO_UTILITY_EVENT", "PressTypeDataVal", 0) { }
public KeyListener() : base("LENOVO_UTILITY_EVENT", "PressTypeDataVal", 0) { }

protected override void OnChanged(Key value)
{
Expand Down

0 comments on commit 36102f3

Please sign in to comment.