From 5f1ee154a542860231bf99e66b17e6d9ad93716f Mon Sep 17 00:00:00 2001 From: Francesco Bertolaccini Date: Thu, 28 Jan 2016 08:25:23 +0100 Subject: [PATCH] Added initialization method --- SharpPhysFS/PhysFS.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/SharpPhysFS/PhysFS.cs b/SharpPhysFS/PhysFS.cs index a60244e..145b1c5 100644 --- a/SharpPhysFS/PhysFS.cs +++ b/SharpPhysFS/PhysFS.cs @@ -124,6 +124,22 @@ namespace PhysFS } } + /// + /// Sets up the library callbacks for use. + /// + /// + /// This method will dynamically load the right library according to the + /// current platform, whether it is Windows of *nix + /// + /// + /// This method must be called before any other method in this class is available. + /// Not doing so will result in NullReferenceException + /// + public static void InitializeCallbacks() + { + Interop.SetUpInterop(); + } + /// /// Get the version of PhysicsFS that is linked against your program ///