mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-25 14:15:47 +03:00
Added Config.ForcePlatform
This commit is contained in:
parent
79bc9ffe24
commit
9756d15468
@ -18,5 +18,17 @@ public static class Config
|
||||
/// </summary>
|
||||
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 @@
|
||||
|
||||
namespace SteamNative
|
||||
{
|
||||
internal static partial class Platform
|
||||
{
|
||||
internal enum OperatingSystem
|
||||
public enum OperatingSystem
|
||||
{
|
||||
Unset,
|
||||
Windows,
|
||||
@ -13,13 +11,15 @@ internal enum OperatingSystem
|
||||
Osx,
|
||||
}
|
||||
|
||||
internal enum Architecture
|
||||
public enum Architecture
|
||||
{
|
||||
Unset,
|
||||
x86,
|
||||
x64
|
||||
}
|
||||
|
||||
internal static partial class Platform
|
||||
{
|
||||
private static OperatingSystem _os;
|
||||
private static Architecture _arch;
|
||||
|
||||
@ -49,6 +49,11 @@ internal static OperatingSystem Os
|
||||
|
||||
return _os;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
_os = value;
|
||||
}
|
||||
}
|
||||
|
||||
internal static Architecture Arch
|
||||
@ -70,6 +75,11 @@ internal static Architecture Arch
|
||||
|
||||
return _arch;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
_arch = value;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsWindows64 { get { return Arch == Architecture.x64 && Os == OperatingSystem.Windows; } }
|
||||
|
Loading…
Reference in New Issue
Block a user