mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-27 07:05:50 +03:00
Config no longer needed
This commit is contained in:
parent
4cef345d95
commit
016b86ce8e
@ -1,47 +0,0 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
public static class Config
|
||||
{
|
||||
static OsType _os;
|
||||
public static OsType Os
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( _os == OsType.None )
|
||||
{
|
||||
string windir = Environment.GetEnvironmentVariable( "windir" );
|
||||
if ( !string.IsNullOrEmpty( windir ) && windir.Contains( @"\" ) && Directory.Exists( windir ) )
|
||||
{
|
||||
_os = OsType.Windows;
|
||||
}
|
||||
else if ( File.Exists( @"/System/Library/CoreServices/SystemVersion.plist" ) )
|
||||
{
|
||||
_os = OsType.Posix;
|
||||
}
|
||||
else if ( File.Exists( @"/proc/sys/kernel/ostype" ) )
|
||||
{
|
||||
_os = OsType.Posix;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new System.Exception( "Couldn't determine operating system" );
|
||||
}
|
||||
}
|
||||
|
||||
return _os;
|
||||
}
|
||||
|
||||
set => _os = value;
|
||||
}
|
||||
}
|
||||
|
||||
public enum OsType
|
||||
{
|
||||
None,
|
||||
Windows,
|
||||
Posix,
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user