Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Android] Fix OpenAL library finding on some phones (fixes #6452) (#6454
)
  • Loading branch information
harry-cpp authored and Jjagg committed Sep 29, 2018
1 parent dd0e463 commit c53ba24
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions MonoGame.Framework/Audio/OpenAL.cs
Expand Up @@ -223,6 +223,15 @@ private static IntPtr GetNativeLibrary()
}
#elif ANDROID
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);
}
#else
ret = FuncLoader.LoadLibrary("/System/Library/Frameworks/OpenAL.framework/OpenAL");
#endif
Expand Down

0 comments on commit c53ba24

Please sign in to comment.