mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-01-20 15:30:28 +01:00
Move RTSSSharedMemoryNET to CommonHelpers
This commit is contained in:
parent
f9572edc79
commit
b442c6fadc
|
|
@ -12,10 +12,19 @@
|
|||
<PackageReference Include="TaskScheduler" Version="2.10.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="RTSSSharedMemoryNET">
|
||||
<HintPath>RTSSSharedMemoryNET.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="inpoutx64.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="RTSSSharedMemoryNET.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
26
CommonHelpers/OSDHelpers.cs
Normal file
26
CommonHelpers/OSDHelpers.cs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
using RTSSSharedMemoryNET;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CommonHelpers
|
||||
{
|
||||
public static class OSDHelpers
|
||||
{
|
||||
public static uint OSDIndex(this OSD? osd)
|
||||
{
|
||||
if (osd is null)
|
||||
return uint.MaxValue;
|
||||
|
||||
var osdSlot = typeof(OSD).GetField("m_osdSlot",
|
||||
System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
|
||||
var value = osdSlot.GetValue(osd);
|
||||
if (value is null)
|
||||
return uint.MaxValue;
|
||||
|
||||
return (uint)value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<Reference Include="RTSSSharedMemoryNET">
|
||||
<HintPath>RTSSSharedMemoryNET.dll</HintPath>
|
||||
<HintPath>..\CommonHelpers\RTSSSharedMemoryNET.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
|
|
@ -58,9 +58,6 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="RTSSSharedMemoryNET.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
|
|
|
|||
|
|
@ -35,11 +35,8 @@
|
|||
<Reference Include="hidapi.net">
|
||||
<HintPath>hidapi.net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="neptune-hidapi.net">
|
||||
<HintPath>NeptuneHid\neptune-hidapi.net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="RTSSSharedMemoryNET">
|
||||
<HintPath>..\PerformanceOverlay\RTSSSharedMemoryNET.dll</HintPath>
|
||||
<HintPath>..\CommonHelpers\RTSSSharedMemoryNET.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue