Addeded IGameLocationProvider. Invoke GameLocation.Current.DataPath to get the game data path. WindowsGameLocationProvider can read the path from the Windows registry. LinuxGameLocationProvider contains only hardcoded paths.
Added OpenALWindowsHook. This hook loads OpenAL (soft_oal.dll) from the specified location if it wasn't found by the native code.
/*
This hook loads OpenAL (soft_oal.dll) from the specified location if it wasn't found by the native code.
Reproduction:
Try to build and run this project from the directory containing # (e.g. "C:\Git\C#\OpenVIII")
Cause:
Incorrectly determined DLL directory.
Method: MonoGame.OpenAL.AL.GetNativeLibrary (MonoGame.Framework.dll)
Line: string directoryName = Path.GetDirectoryName(new Uri(typeof (AL).Assembly.CodeBase).LocalPath);
Uri.OriginalString: file:///C:/Git/C#/OpenVIII/FF8/bin/x64/Debug/MonoGame.Framework.DLL
Uri.LocalPath: C:\\Git\\C
Uri.Fragment: #/OpenVIII/FF8/bin/x64/Debug/MonoGame.Framework.DLL
GetDirectoryName: C:\Git
Expected: C:\Git\C#\OpenVIII\FF8\bin\x64\Debug
Exception:
Microsoft.Xna.Framework.Audio.NoAudioHardwareException (0x80004005): OpenAL device could not be initialized. ---> System.NullReferenceException:
at Microsoft.Xna.Framework.Audio.OpenALSoundController.OpenSoundController()
at Microsoft.Xna.Framework.Audio.OpenALSoundController.OpenSoundController()
at Microsoft.Xna.Framework.Audio.OpenALSoundController..ctor()
at Microsoft.Xna.Framework.Audio.OpenALSoundController.get_GetInstance()
at Microsoft.Xna.Framework.SdlGamePlatform..ctor(Game game)
at Microsoft.Xna.Framework.Game..ctor()
at FF8.Game1..ctor()
at FF8.Program.Main()
Addeded IGameLocationProvider. Invoke GameLocation.Current.DataPath to get the game data path. WindowsGameLocationProvider can read the path from the Windows registry. LinuxGameLocationProvider contains only hardcoded paths.
Added OpenALWindowsHook. This hook loads OpenAL (soft_oal.dll) from the specified location if it wasn't found by the native code.
/* This hook loads OpenAL (soft_oal.dll) from the specified location if it wasn't found by the native code.
*/