Example #1
0
 private static IntPtr GetNativeLibrary()
 {
     if (CurrentPlatform.OS == OS.Windows)
     {
         return(FuncLoader.LoadLibraryExt("SDL2.dll"));
     }
     else if (CurrentPlatform.OS == OS.Linux)
     {
         return(FuncLoader.LoadLibraryExt("libSDL2-2.0.so.0"));
     }
     else if (CurrentPlatform.OS == OS.MacOSX)
     {
         return(FuncLoader.LoadLibraryExt("libSDL2-2.0.0.dylib"));
     }
     else
     {
         return(FuncLoader.LoadLibraryExt("sdl2"));
     }
 }
Example #2
0
        private static IntPtr GetNativeLibrary()
        {
#if DESKTOPGL
            if (CurrentPlatform.OS == OS.Windows)
            {
                return(FuncLoader.LoadLibraryExt("soft_oal.dll"));
            }
            else if (CurrentPlatform.OS == OS.Linux)
            {
                return(FuncLoader.LoadLibraryExt("libopenal.so.1"));
            }
            else if (CurrentPlatform.OS == OS.MacOSX)
            {
                return(FuncLoader.LoadLibraryExt("libopenal.1.dylib"));
            }
            else
            {
                return(FuncLoader.LoadLibraryExt("openal"));
            }
#elif ANDROID
            var ret = FuncLoader.LoadLibrary("libopenal32.so");

            if (ret == IntPtr.Zero)
            {
                var appFilesDir = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
                var appDir      = Path.GetDirectoryName(appFilesDir);
                var lib         = Path.Combine(appDir, "lib", "libopenal32.so");

                ret = FuncLoader.LoadLibrary(lib);
            }

            return(ret);
#else
            return(FuncLoader.LoadLibrary("/System/Library/Frameworks/OpenAL.framework/OpenAL"));
#endif
        }