SHA256
Add CommonWarningDialogUI and RegistryUtil to Support NVIDIA Driver Warning
This commit is contained in:
7 files changed
+539
-10
No files matched your search
@@ -32,12 +32,12 @@ namespace ADOFAIRenderer.UI
|
||||
private System.Threading.CancellationTokenSource? _cts;
|
||||
private readonly System.Collections.Concurrent.ConcurrentQueue<Action> _mainThreadQueue = new();
|
||||
|
||||
private static bool CheckFFmpegExists()
|
||||
public static bool CheckFFmpegExists()
|
||||
{
|
||||
var userLibs = MelonEnvironment.UserLibsDirectory;
|
||||
if (!Directory.Exists(userLibs)) return false;
|
||||
|
||||
string searchPattern = Application.platform switch
|
||||
var searchPattern = Application.platform switch
|
||||
{
|
||||
RuntimePlatform.WindowsPlayer => "avcodec-*.dll",
|
||||
RuntimePlatform.OSXPlayer => "libavcodec.*.dylib",
|
||||
@@ -58,8 +58,11 @@ namespace ADOFAIRenderer.UI
|
||||
obj.AddComponent<FFmpegDownloadUI>();
|
||||
}
|
||||
|
||||
public static FFmpegDownloadUI? Instance { get; private set; }
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
Instance = this;
|
||||
if (CheckFFmpegExists())
|
||||
{
|
||||
Destroy(gameObject);
|
||||
@@ -647,6 +650,10 @@ namespace ADOFAIRenderer.UI
|
||||
private void OnDestroy()
|
||||
{
|
||||
_cts?.Dispose();
|
||||
if (Instance == this)
|
||||
{
|
||||
Instance = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user