mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-24 05:35:35 +03:00
64bit only
This commit is contained in:
parent
4b9eba285a
commit
15b04eec2a
@ -20,22 +20,21 @@ public static void ForUnity( string platform )
|
||||
//
|
||||
if (IntPtr.Size == 4) UseThisCall = false;
|
||||
|
||||
ForcePlatform( OperatingSystem.Windows, IntPtr.Size == 4 ? Architecture.x86 : Architecture.x64 );
|
||||
ForcePlatform( OperatingSystem.Windows );
|
||||
}
|
||||
|
||||
if ( platform == "OSXEditor" || platform == "OSXPlayer" || platform == "OSXDashboardPlayer" )
|
||||
{
|
||||
ForcePlatform( OperatingSystem.macOS, IntPtr.Size == 4 ? Architecture.x86 : Architecture.x64 );
|
||||
ForcePlatform( OperatingSystem.macOS );
|
||||
}
|
||||
|
||||
if ( platform == "LinuxPlayer" || platform == "LinuxEditor" )
|
||||
{
|
||||
ForcePlatform( OperatingSystem.Linux, IntPtr.Size == 4 ? Architecture.x86 : Architecture.x64 );
|
||||
ForcePlatform( OperatingSystem.Linux );
|
||||
}
|
||||
|
||||
Console.WriteLine( "Facepunch.Steamworks Unity: " + platform );
|
||||
Console.WriteLine( "Facepunch.Steamworks Os: " + SteamNative.Platform.Os );
|
||||
Console.WriteLine( "Facepunch.Steamworks Arch: " + SteamNative.Platform.Arch );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -55,10 +54,9 @@ public static void ForUnity( string platform )
|
||||
/// This is useful if you're on OSX because some versions of mono don't have a way
|
||||
/// to tell which platform we're running
|
||||
/// </summary>
|
||||
public static void ForcePlatform( Facepunch.Steamworks.OperatingSystem os, Facepunch.Steamworks.Architecture arch )
|
||||
public static void ForcePlatform( Facepunch.Steamworks.OperatingSystem os )
|
||||
{
|
||||
SteamNative.Platform.Os = os;
|
||||
SteamNative.Platform.Arch = arch;
|
||||
}
|
||||
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -6,7 +6,7 @@ namespace SteamNative
|
||||
{
|
||||
internal static partial class Platform
|
||||
{
|
||||
internal class Linux64 : Interface
|
||||
internal class Linux : Interface
|
||||
{
|
||||
internal IntPtr _ptr;
|
||||
public bool IsValid { get{ return _ptr != IntPtr.Zero; } }
|
||||
@ -14,7 +14,7 @@ internal class Linux64 : Interface
|
||||
//
|
||||
// Constructor sets pointer to native class
|
||||
//
|
||||
internal Linux64( IntPtr pointer )
|
||||
internal Linux( IntPtr pointer )
|
||||
{
|
||||
_ptr = pointer;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -6,7 +6,7 @@ namespace SteamNative
|
||||
{
|
||||
internal static partial class Platform
|
||||
{
|
||||
internal class Win64 : Interface
|
||||
internal class Windows : Interface
|
||||
{
|
||||
internal IntPtr _ptr;
|
||||
public bool IsValid { get{ return _ptr != IntPtr.Zero; } }
|
||||
@ -14,7 +14,7 @@ internal class Win64 : Interface
|
||||
//
|
||||
// Constructor sets pointer to native class
|
||||
//
|
||||
internal Win64( IntPtr pointer )
|
||||
internal Windows( IntPtr pointer )
|
||||
{
|
||||
_ptr = pointer;
|
||||
}
|
||||
|
@ -11,13 +11,6 @@ public enum OperatingSystem
|
||||
Linux,
|
||||
macOS,
|
||||
}
|
||||
|
||||
public enum Architecture
|
||||
{
|
||||
Unset,
|
||||
x86,
|
||||
x64
|
||||
}
|
||||
}
|
||||
|
||||
namespace SteamNative
|
||||
@ -25,7 +18,6 @@ namespace SteamNative
|
||||
internal static partial class Platform
|
||||
{
|
||||
private static Facepunch.Steamworks.OperatingSystem _os;
|
||||
private static Facepunch.Steamworks.Architecture _arch;
|
||||
|
||||
public static Facepunch.Steamworks.OperatingSystem RunningPlatform()
|
||||
{
|
||||
@ -71,43 +63,14 @@ internal static Facepunch.Steamworks.OperatingSystem Os
|
||||
}
|
||||
}
|
||||
|
||||
internal static Facepunch.Steamworks.Architecture Arch
|
||||
{
|
||||
get
|
||||
{
|
||||
//
|
||||
// Work out whether we're 64bit or 32bit
|
||||
//
|
||||
if ( _arch == Facepunch.Steamworks.Architecture.Unset )
|
||||
{
|
||||
if ( IntPtr.Size == 8 )
|
||||
_arch = Facepunch.Steamworks.Architecture.x64;
|
||||
else if ( IntPtr.Size == 4 )
|
||||
_arch = Facepunch.Steamworks.Architecture.x86;
|
||||
else
|
||||
throw new System.Exception( "Unsupported Architecture!" );
|
||||
}
|
||||
|
||||
return _arch;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
_arch = value;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsWindows { get { return Os == Facepunch.Steamworks.OperatingSystem.Windows; } }
|
||||
public static bool IsWindows64 { get { return Arch == Facepunch.Steamworks.Architecture.x64 && IsWindows; } }
|
||||
public static bool IsWindows32 { get { return Arch == Facepunch.Steamworks.Architecture.x86 && IsWindows; } }
|
||||
public static bool IsLinux64 { get { return Arch == Facepunch.Steamworks.Architecture.x64 && Os == Facepunch.Steamworks.OperatingSystem.Linux; } }
|
||||
public static bool IsLinux32 { get { return Arch == Facepunch.Steamworks.Architecture.x86 && Os == Facepunch.Steamworks.OperatingSystem.Linux; } }
|
||||
public static bool IsOsx { get { return Os == Facepunch.Steamworks.OperatingSystem.macOS; } }
|
||||
public static bool IsWindows => Os == Facepunch.Steamworks.OperatingSystem.Windows;
|
||||
public static bool IsLinux => Os == Facepunch.Steamworks.OperatingSystem.Linux;
|
||||
public static bool IsOsx => Os == Facepunch.Steamworks.OperatingSystem.macOS;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// We're only Pack = 8 on Windows
|
||||
/// </summary>
|
||||
public static bool PackSmall { get { return Os != Facepunch.Steamworks.OperatingSystem.Windows; } }
|
||||
/// <summary>
|
||||
/// We're only Pack = 8 on Windows
|
||||
/// </summary>
|
||||
public static bool PackSmall => Os != Facepunch.Steamworks.OperatingSystem.Windows;
|
||||
}
|
||||
}
|
||||
|
@ -17,10 +17,8 @@ internal unsafe class SteamApi : IDisposable
|
||||
internal SteamApi()
|
||||
{
|
||||
|
||||
if ( Platform.IsWindows64 ) platform = new Platform.Win64( ((IntPtr)1) );
|
||||
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( ((IntPtr)1) );
|
||||
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( ((IntPtr)1) );
|
||||
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( ((IntPtr)1) );
|
||||
if ( Platform.IsWindows ) platform = new Platform.Windows( ((IntPtr)1) );
|
||||
else if ( Platform.IsLinux ) platform = new Platform.Linux( ((IntPtr)1) );
|
||||
else if ( Platform.IsOsx ) platform = new Platform.Mac( ((IntPtr)1) );
|
||||
}
|
||||
|
||||
|
@ -19,10 +19,8 @@ internal SteamAppList( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr po
|
||||
{
|
||||
this.steamworks = steamworks;
|
||||
|
||||
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
|
||||
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
|
||||
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
|
||||
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
|
||||
if ( Platform.IsWindows ) platform = new Platform.Windows( pointer );
|
||||
else if ( Platform.IsLinux ) platform = new Platform.Linux( pointer );
|
||||
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
|
||||
}
|
||||
|
||||
|
@ -19,10 +19,8 @@ internal SteamApps( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr point
|
||||
{
|
||||
this.steamworks = steamworks;
|
||||
|
||||
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
|
||||
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
|
||||
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
|
||||
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
|
||||
if ( Platform.IsWindows ) platform = new Platform.Windows( pointer );
|
||||
else if ( Platform.IsLinux ) platform = new Platform.Linux( pointer );
|
||||
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
|
||||
}
|
||||
|
||||
|
@ -19,10 +19,8 @@ internal SteamClient( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr poi
|
||||
{
|
||||
this.steamworks = steamworks;
|
||||
|
||||
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
|
||||
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
|
||||
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
|
||||
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
|
||||
if ( Platform.IsWindows ) platform = new Platform.Windows( pointer );
|
||||
else if ( Platform.IsLinux ) platform = new Platform.Linux( pointer );
|
||||
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
|
||||
}
|
||||
|
||||
|
@ -19,10 +19,8 @@ internal SteamController( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr
|
||||
{
|
||||
this.steamworks = steamworks;
|
||||
|
||||
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
|
||||
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
|
||||
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
|
||||
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
|
||||
if ( Platform.IsWindows ) platform = new Platform.Windows( pointer );
|
||||
else if ( Platform.IsLinux ) platform = new Platform.Linux( pointer );
|
||||
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
|
||||
}
|
||||
|
||||
|
@ -19,10 +19,8 @@ internal SteamFriends( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr po
|
||||
{
|
||||
this.steamworks = steamworks;
|
||||
|
||||
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
|
||||
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
|
||||
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
|
||||
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
|
||||
if ( Platform.IsWindows ) platform = new Platform.Windows( pointer );
|
||||
else if ( Platform.IsLinux ) platform = new Platform.Linux( pointer );
|
||||
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
|
||||
}
|
||||
|
||||
|
@ -19,10 +19,8 @@ internal SteamGameServer( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr
|
||||
{
|
||||
this.steamworks = steamworks;
|
||||
|
||||
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
|
||||
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
|
||||
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
|
||||
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
|
||||
if ( Platform.IsWindows ) platform = new Platform.Windows( pointer );
|
||||
else if ( Platform.IsLinux ) platform = new Platform.Linux( pointer );
|
||||
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
|
||||
}
|
||||
|
||||
|
@ -19,10 +19,8 @@ internal SteamGameServerStats( Facepunch.Steamworks.BaseSteamworks steamworks, I
|
||||
{
|
||||
this.steamworks = steamworks;
|
||||
|
||||
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
|
||||
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
|
||||
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
|
||||
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
|
||||
if ( Platform.IsWindows ) platform = new Platform.Windows( pointer );
|
||||
else if ( Platform.IsLinux ) platform = new Platform.Linux( pointer );
|
||||
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
|
||||
}
|
||||
|
||||
|
@ -19,10 +19,8 @@ internal SteamHTMLSurface( Facepunch.Steamworks.BaseSteamworks steamworks, IntPt
|
||||
{
|
||||
this.steamworks = steamworks;
|
||||
|
||||
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
|
||||
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
|
||||
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
|
||||
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
|
||||
if ( Platform.IsWindows ) platform = new Platform.Windows( pointer );
|
||||
else if ( Platform.IsLinux ) platform = new Platform.Linux( pointer );
|
||||
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
|
||||
}
|
||||
|
||||
|
@ -19,10 +19,8 @@ internal SteamHTTP( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr point
|
||||
{
|
||||
this.steamworks = steamworks;
|
||||
|
||||
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
|
||||
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
|
||||
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
|
||||
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
|
||||
if ( Platform.IsWindows ) platform = new Platform.Windows( pointer );
|
||||
else if ( Platform.IsLinux ) platform = new Platform.Linux( pointer );
|
||||
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
|
||||
}
|
||||
|
||||
|
@ -19,10 +19,8 @@ internal SteamInventory( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr
|
||||
{
|
||||
this.steamworks = steamworks;
|
||||
|
||||
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
|
||||
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
|
||||
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
|
||||
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
|
||||
if ( Platform.IsWindows ) platform = new Platform.Windows( pointer );
|
||||
else if ( Platform.IsLinux ) platform = new Platform.Linux( pointer );
|
||||
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
|
||||
}
|
||||
|
||||
|
@ -19,10 +19,8 @@ internal SteamMatchmaking( Facepunch.Steamworks.BaseSteamworks steamworks, IntPt
|
||||
{
|
||||
this.steamworks = steamworks;
|
||||
|
||||
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
|
||||
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
|
||||
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
|
||||
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
|
||||
if ( Platform.IsWindows ) platform = new Platform.Windows( pointer );
|
||||
else if ( Platform.IsLinux ) platform = new Platform.Linux( pointer );
|
||||
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
|
||||
}
|
||||
|
||||
|
@ -19,10 +19,8 @@ internal SteamMatchmakingServers( Facepunch.Steamworks.BaseSteamworks steamworks
|
||||
{
|
||||
this.steamworks = steamworks;
|
||||
|
||||
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
|
||||
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
|
||||
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
|
||||
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
|
||||
if ( Platform.IsWindows ) platform = new Platform.Windows( pointer );
|
||||
else if ( Platform.IsLinux ) platform = new Platform.Linux( pointer );
|
||||
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
|
||||
}
|
||||
|
||||
|
@ -19,10 +19,8 @@ internal SteamMusic( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr poin
|
||||
{
|
||||
this.steamworks = steamworks;
|
||||
|
||||
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
|
||||
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
|
||||
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
|
||||
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
|
||||
if ( Platform.IsWindows ) platform = new Platform.Windows( pointer );
|
||||
else if ( Platform.IsLinux ) platform = new Platform.Linux( pointer );
|
||||
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
|
||||
}
|
||||
|
||||
|
@ -19,10 +19,8 @@ internal SteamMusicRemote( Facepunch.Steamworks.BaseSteamworks steamworks, IntPt
|
||||
{
|
||||
this.steamworks = steamworks;
|
||||
|
||||
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
|
||||
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
|
||||
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
|
||||
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
|
||||
if ( Platform.IsWindows ) platform = new Platform.Windows( pointer );
|
||||
else if ( Platform.IsLinux ) platform = new Platform.Linux( pointer );
|
||||
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
|
||||
}
|
||||
|
||||
|
@ -19,10 +19,8 @@ internal SteamNetworking( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr
|
||||
{
|
||||
this.steamworks = steamworks;
|
||||
|
||||
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
|
||||
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
|
||||
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
|
||||
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
|
||||
if ( Platform.IsWindows ) platform = new Platform.Windows( pointer );
|
||||
else if ( Platform.IsLinux ) platform = new Platform.Linux( pointer );
|
||||
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
|
||||
}
|
||||
|
||||
|
@ -19,10 +19,8 @@ internal SteamParentalSettings( Facepunch.Steamworks.BaseSteamworks steamworks,
|
||||
{
|
||||
this.steamworks = steamworks;
|
||||
|
||||
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
|
||||
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
|
||||
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
|
||||
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
|
||||
if ( Platform.IsWindows ) platform = new Platform.Windows( pointer );
|
||||
else if ( Platform.IsLinux ) platform = new Platform.Linux( pointer );
|
||||
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
|
||||
}
|
||||
|
||||
|
@ -19,10 +19,8 @@ internal SteamRemoteStorage( Facepunch.Steamworks.BaseSteamworks steamworks, Int
|
||||
{
|
||||
this.steamworks = steamworks;
|
||||
|
||||
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
|
||||
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
|
||||
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
|
||||
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
|
||||
if ( Platform.IsWindows ) platform = new Platform.Windows( pointer );
|
||||
else if ( Platform.IsLinux ) platform = new Platform.Linux( pointer );
|
||||
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
|
||||
}
|
||||
|
||||
|
@ -19,10 +19,8 @@ internal SteamScreenshots( Facepunch.Steamworks.BaseSteamworks steamworks, IntPt
|
||||
{
|
||||
this.steamworks = steamworks;
|
||||
|
||||
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
|
||||
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
|
||||
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
|
||||
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
|
||||
if ( Platform.IsWindows ) platform = new Platform.Windows( pointer );
|
||||
else if ( Platform.IsLinux ) platform = new Platform.Linux( pointer );
|
||||
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
|
||||
}
|
||||
|
||||
|
@ -19,10 +19,8 @@ internal SteamUGC( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr pointe
|
||||
{
|
||||
this.steamworks = steamworks;
|
||||
|
||||
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
|
||||
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
|
||||
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
|
||||
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
|
||||
if ( Platform.IsWindows ) platform = new Platform.Windows( pointer );
|
||||
else if ( Platform.IsLinux ) platform = new Platform.Linux( pointer );
|
||||
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
|
||||
}
|
||||
|
||||
|
@ -19,10 +19,8 @@ internal SteamUser( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr point
|
||||
{
|
||||
this.steamworks = steamworks;
|
||||
|
||||
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
|
||||
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
|
||||
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
|
||||
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
|
||||
if ( Platform.IsWindows ) platform = new Platform.Windows( pointer );
|
||||
else if ( Platform.IsLinux ) platform = new Platform.Linux( pointer );
|
||||
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
|
||||
}
|
||||
|
||||
|
@ -19,10 +19,8 @@ internal SteamUserStats( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr
|
||||
{
|
||||
this.steamworks = steamworks;
|
||||
|
||||
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
|
||||
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
|
||||
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
|
||||
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
|
||||
if ( Platform.IsWindows ) platform = new Platform.Windows( pointer );
|
||||
else if ( Platform.IsLinux ) platform = new Platform.Linux( pointer );
|
||||
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
|
||||
}
|
||||
|
||||
|
@ -19,10 +19,8 @@ internal SteamUtils( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr poin
|
||||
{
|
||||
this.steamworks = steamworks;
|
||||
|
||||
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
|
||||
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
|
||||
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
|
||||
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
|
||||
if ( Platform.IsWindows ) platform = new Platform.Windows( pointer );
|
||||
else if ( Platform.IsLinux ) platform = new Platform.Linux( pointer );
|
||||
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
|
||||
}
|
||||
|
||||
|
@ -19,10 +19,8 @@ internal SteamVideo( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr poin
|
||||
{
|
||||
this.steamworks = steamworks;
|
||||
|
||||
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
|
||||
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
|
||||
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
|
||||
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
|
||||
if ( Platform.IsWindows ) platform = new Platform.Windows( pointer );
|
||||
else if ( Platform.IsLinux ) platform = new Platform.Linux( pointer );
|
||||
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
|
||||
}
|
||||
|
||||
|
@ -58,10 +58,8 @@ private void Class( string classname, SteamApiDefinition.MethodDef[] methodDef )
|
||||
StartBlock( $"internal {InterfaceNameToClass( classname )}()" );
|
||||
{
|
||||
WriteLine( "" );
|
||||
WriteLine( "if ( Platform.IsWindows64 ) platform = new Platform.Win64( ((IntPtr)1) );" );
|
||||
WriteLine( "else if ( Platform.IsWindows32 ) platform = new Platform.Win32( ((IntPtr)1) );" );
|
||||
WriteLine( "else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( ((IntPtr)1) );" );
|
||||
WriteLine( "else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( ((IntPtr)1) );" );
|
||||
WriteLine( "if ( Platform.IsWindows ) platform = new Platform.Windows( ((IntPtr)1) );" );
|
||||
WriteLine( "else if ( Platform.IsLinux ) platform = new Platform.Linux( ((IntPtr)1) );" );
|
||||
WriteLine( "else if ( Platform.IsOsx ) platform = new Platform.Mac( ((IntPtr)1) );" );
|
||||
}
|
||||
EndBlock();
|
||||
@ -72,10 +70,8 @@ private void Class( string classname, SteamApiDefinition.MethodDef[] methodDef )
|
||||
{
|
||||
WriteLine( "this.steamworks = steamworks;" );
|
||||
WriteLine( "" );
|
||||
WriteLine( "if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );" );
|
||||
WriteLine( "else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );" );
|
||||
WriteLine( "else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );" );
|
||||
WriteLine( "else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );" );
|
||||
WriteLine( "if ( Platform.IsWindows ) platform = new Platform.Windows( pointer );" );
|
||||
WriteLine( "else if ( Platform.IsLinux ) platform = new Platform.Linux( pointer );" );
|
||||
WriteLine( "else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );" );
|
||||
}
|
||||
EndBlock();
|
||||
|
@ -63,15 +63,7 @@ public void ToFolder( string folder )
|
||||
{
|
||||
sb = new StringBuilder();
|
||||
Header();
|
||||
PlatformClass( "Win32", "steam_api.dll", true );
|
||||
Footer();
|
||||
System.IO.File.WriteAllText( $"{folder}SteamNative.Platform.Win32.cs", sb.ToString() );
|
||||
}
|
||||
|
||||
{
|
||||
sb = new StringBuilder();
|
||||
Header();
|
||||
PlatformClass( "Win64", "steam_api64.dll", true );
|
||||
PlatformClass( "Windows", "steam_api64.dll", true );
|
||||
Footer();
|
||||
System.IO.File.WriteAllText( $"{folder}SteamNative.Platform.Win64.cs", sb.ToString() );
|
||||
}
|
||||
@ -79,15 +71,7 @@ public void ToFolder( string folder )
|
||||
{
|
||||
sb = new StringBuilder();
|
||||
Header();
|
||||
PlatformClass( "Linux32", "libsteam_api.so", false );
|
||||
Footer();
|
||||
System.IO.File.WriteAllText( $"{folder}SteamNative.Platform.Linux32.cs", sb.ToString() );
|
||||
}
|
||||
|
||||
{
|
||||
sb = new StringBuilder();
|
||||
Header();
|
||||
PlatformClass( "Linux64", "libsteam_api64.so", false );
|
||||
PlatformClass( "Linux", "libsteam_api64.so", false );
|
||||
Footer();
|
||||
System.IO.File.WriteAllText( $"{folder}SteamNative.Platform.Linux64.cs", sb.ToString() );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user