Skip to content

Commit

Permalink
Updated cswin32
Browse files Browse the repository at this point in the history
  • Loading branch information
BartoszCichecki committed Nov 5, 2023
1 parent 4fe2fcf commit 87c409e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static unsafe void ChangeStartMode(this ServiceController svc, bool enabl
throw new ExternalException("Open Service Error");

var result = PInvoke.ChangeServiceConfig(serviceHandle,
PInvoke.SERVICE_NO_CHANGE,
(ENUM_SERVICE_TYPE)PInvoke.SERVICE_NO_CHANGE,
enabled ? SERVICE_START_TYPE.SERVICE_AUTO_START : SERVICE_START_TYPE.SERVICE_DISABLED,
SERVICE_ERROR.SERVICE_ERROR_NORMAL,
null as string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ private unsafe bool IsDGPUAvailable(HardwareId dgpuHardwareId)
if (PInvoke.CM_Get_DevNode_Status(out var status, out _, deviceInfoData.DevInst, 0) != 0)
continue;

if ((status & 0x400) != 0)
if (status.HasFlag(CM_DEVNODE_STATUS_FLAGS.DN_HAS_PROBLEM))
continue;

return true;
Expand Down
2 changes: 1 addition & 1 deletion LenovoLegionToolkit.Lib/LenovoLegionToolkit.Lib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<PackageReference Include="CoordinateSharp" Version="2.20.1.1" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.Win32.SystemEvents" Version="7.0.0" />
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.18-beta">
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.49-beta">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down

0 comments on commit 87c409e

Please sign in to comment.