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:
@@ -181,6 +181,7 @@ namespace Flowframes.Forms.Main
|
||||
try
|
||||
{
|
||||
// Task.Run(() => Updater.UpdateModelList());
|
||||
StartupChecks.GpuCheck();
|
||||
Task.Run(() => Updater.AsyncUpdateCheck());
|
||||
Task.Run(() => GetWebInfo.LoadNews(newsLabel));
|
||||
Task.Run(() => GetWebInfo.LoadPatronListCsv(patronsLabel));
|
||||
|
||||
3
CodeLegacy/Forms/MessageForm.Designer.cs
generated
3
CodeLegacy/Forms/MessageForm.Designer.cs
generated
@@ -37,11 +37,12 @@
|
||||
// textLabel
|
||||
//
|
||||
this.textLabel.AutoSize = true;
|
||||
this.textLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.textLabel.ForeColor = System.Drawing.Color.White;
|
||||
this.textLabel.Location = new System.Drawing.Point(15, 15);
|
||||
this.textLabel.Margin = new System.Windows.Forms.Padding(8, 0, 3, 0);
|
||||
this.textLabel.Name = "textLabel";
|
||||
this.textLabel.Size = new System.Drawing.Size(0, 13);
|
||||
this.textLabel.Size = new System.Drawing.Size(0, 16);
|
||||
this.textLabel.TabIndex = 8;
|
||||
//
|
||||
// btn1
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ namespace Flowframes.Ui
|
||||
if (type == MessageType.Warning) icon = MessageBoxIcon.Warning;
|
||||
else if (type == MessageType.Error) icon = MessageBoxIcon.Error;
|
||||
|
||||
MessageForm form = new MessageForm(text, type.ToString());
|
||||
MessageForm form = new MessageForm(text, type.ToString()) { TopMost = true };
|
||||
form.ShowDialog();
|
||||
return DialogResult.OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user