Allow user to specify library name for Interop

pull/2/head
Benjamin Moir 2017-05-20 22:21:17 +10:00 committed by GitHub
parent 1e3c2be295
commit 8dd43f4bc4
1 changed files with 6 additions and 0 deletions

View File

@ -32,6 +32,12 @@ namespace SharpPhysFS
Init(argv0); Init(argv0);
} }
public PhysFS(string argv0, string libname)
{
interop = new Interop(libname);
Init(argv0);
}
static T FromPtr<T>(IntPtr ptr) static T FromPtr<T>(IntPtr ptr)
{ {
return (T)Marshal.PtrToStructure(ptr, typeof(T)); return (T)Marshal.PtrToStructure(ptr, typeof(T));