Skip to content

Commit

Permalink
Fixed method names
Browse files Browse the repository at this point in the history
  • Loading branch information
KimihikoAkayasaki committed Dec 21, 2024
1 parent 6e8bf81 commit c6c318a
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions plugin_OpenVR/Utils/DriverHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,34 @@ public class DriverHelper
{
public static int InstallDriverProxyStub(bool emulated)
{
return emulated ? Install00ProxyStub() : InstallProxyStub();
return emulated ? Methods00.InstallProxyStub() : Methods.InstallProxyStub();
}

public static int UninstallDriverProxyStub(bool emulated)
{
return emulated ? Uninstall00ProxyStub() : UninstallProxyStub();
return emulated ? Methods00.UninstallProxyStub() : Methods.UninstallProxyStub();
}

[DllImport("driver_Amethyst.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern int InstallProxyStub();

[DllImport("driver_Amethyst.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern int UninstallProxyStub();

[DllImport("driver_00Amethyst.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern int Install00ProxyStub();

[DllImport("driver_00Amethyst.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern int Uninstall00ProxyStub();

[DllImport("oleaut32.dll", PreserveSig = false)]
public static extern void GetActiveObject(ref Guid rclsid, IntPtr pvReserved,
[MarshalAs(UnmanagedType.IUnknown)] out object ppunk
);

internal static class Methods
{
[DllImport("driver_Amethyst.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern int InstallProxyStub();

[DllImport("driver_Amethyst.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern int UninstallProxyStub();
}

internal static class Methods00
{
[DllImport("driver_00Amethyst.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern int InstallProxyStub();

[DllImport("driver_00Amethyst.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern int UninstallProxyStub();
}
}

0 comments on commit c6c318a

Please sign in to comment.