mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-13 15:18:07 +03:00
Added Config.ForcePlatform
This commit is contained in:
parent
79bc9ffe24
commit
9756d15468
@ -18,5 +18,17 @@ namespace Facepunch.Steamworks
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static bool UseThisCall { get; set; } = true;
|
public static bool UseThisCall { get; set; } = true;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// You can force the platform to a particular one here.
|
||||||
|
/// 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( SteamNative.OperatingSystem os, SteamNative.Architecture arch )
|
||||||
|
{
|
||||||
|
SteamNative.Platform.Os = os;
|
||||||
|
SteamNative.Platform.Arch = arch;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,9 +3,7 @@ using System.Runtime.InteropServices;
|
|||||||
|
|
||||||
namespace SteamNative
|
namespace SteamNative
|
||||||
{
|
{
|
||||||
internal static partial class Platform
|
public enum OperatingSystem
|
||||||
{
|
|
||||||
internal enum OperatingSystem
|
|
||||||
{
|
{
|
||||||
Unset,
|
Unset,
|
||||||
Windows,
|
Windows,
|
||||||
@ -13,13 +11,15 @@ namespace SteamNative
|
|||||||
Osx,
|
Osx,
|
||||||
}
|
}
|
||||||
|
|
||||||
internal enum Architecture
|
public enum Architecture
|
||||||
{
|
{
|
||||||
Unset,
|
Unset,
|
||||||
x86,
|
x86,
|
||||||
x64
|
x64
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static partial class Platform
|
||||||
|
{
|
||||||
private static OperatingSystem _os;
|
private static OperatingSystem _os;
|
||||||
private static Architecture _arch;
|
private static Architecture _arch;
|
||||||
|
|
||||||
@ -49,6 +49,11 @@ namespace SteamNative
|
|||||||
|
|
||||||
return _os;
|
return _os;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_os = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static Architecture Arch
|
internal static Architecture Arch
|
||||||
@ -70,6 +75,11 @@ namespace SteamNative
|
|||||||
|
|
||||||
return _arch;
|
return _arch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_arch = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool IsWindows64 { get { return Arch == Architecture.x64 && Os == OperatingSystem.Windows; } }
|
public static bool IsWindows64 { get { return Arch == Architecture.x64 && Os == OperatingSystem.Windows; } }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user