Add OSX lib loading code

pull/2/head
Francesco Bertolaccini 2016-01-29 20:05:26 +01:00
parent a773a4eef6
commit a5b0974b15
1 changed files with 6 additions and 0 deletions

View File

@ -214,6 +214,12 @@ namespace SharpPhysFS
loadSymbol = DynamicLoader.GetProcAddress; loadSymbol = DynamicLoader.GetProcAddress;
libraryName = "physfs.dll"; libraryName = "physfs.dll";
} }
else if(Environment.OSVersion.Platform == PlatformID.MacOSX)
{
loadLibrary = n => DynamicLoader.osx_dlopen(n, 1);
loadSymbol = DynamicLoader.osx_dlsym;
libraryName = "libphysfs.dylib";
}
else else
{ {
loadLibrary = n => DynamicLoader.unix_dlopen(n, 1); loadLibrary = n => DynamicLoader.unix_dlopen(n, 1);