mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-16 16:37:48 +01:00
Check for GPU availability on startup, no CPU fallback for now since NCNN VS doesn't support it
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Flowframes.Forms.Main;
|
||||
using Flowframes.IO;
|
||||
using Flowframes.Ui;
|
||||
|
||||
@@ -121,5 +122,26 @@ namespace Flowframes.Os
|
||||
IoUtils.TryDeleteIfExists(devmodeBatchPath);
|
||||
}
|
||||
}
|
||||
|
||||
public static void GpuCheck(bool exit = true)
|
||||
{
|
||||
bool anyGpu = OsUtils.HasGpu();
|
||||
|
||||
if (!anyGpu)
|
||||
{
|
||||
if (exit)
|
||||
{
|
||||
Form1.CloseAllSplashForms();
|
||||
}
|
||||
|
||||
UiUtils.ShowMessageBox("No GPU detected!\n\nFlowframes requires a GPU (graphics card or integrated) with Vulkan support to run AI interpolation models.\n\nRecommended:" +
|
||||
"\n- Nvidia GeForce GTX 1000 series or newer\n- AMD Radeon RX 5000 series or newer", UiUtils.MessageType.Error);
|
||||
|
||||
if (exit)
|
||||
{
|
||||
Application.Exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user