Enable Lumina GameData StreamPool (#1783)

This commit is contained in:
srkizer 2024-04-21 22:52:46 +09:00 committed by GitHub
parent 7280744def
commit 8a516ff6bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,4 +1,3 @@
using System.Diagnostics;
using System.IO;
using System.Threading;
@ -52,15 +51,12 @@ internal sealed class DataManager : IInternalDisposableService, IDataManager
DefaultExcelLanguage = this.Language.ToLumina(),
};
var processModule = Process.GetCurrentProcess().MainModule;
if (processModule != null)
this.GameData = new(
Path.Combine(Path.GetDirectoryName(Environment.ProcessPath)!, "sqpack"),
luminaOptions)
{
this.GameData = new GameData(Path.Combine(Path.GetDirectoryName(processModule.FileName)!, "sqpack"), luminaOptions);
}
else
{
throw new Exception("Could not main module.");
}
StreamPool = new(),
};
Log.Information("Lumina is ready: {0}", this.GameData.DataPath);