diff --git a/CodeLegacy/Forms/Main/Form1.cs b/CodeLegacy/Forms/Main/Form1.cs index b63c409..fafbbb3 100644 --- a/CodeLegacy/Forms/Main/Form1.cs +++ b/CodeLegacy/Forms/Main/Form1.cs @@ -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)); diff --git a/CodeLegacy/Forms/MessageForm.Designer.cs b/CodeLegacy/Forms/MessageForm.Designer.cs index d873dd1..67e21b3 100644 --- a/CodeLegacy/Forms/MessageForm.Designer.cs +++ b/CodeLegacy/Forms/MessageForm.Designer.cs @@ -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 diff --git a/CodeLegacy/Os/StartupChecks.cs b/CodeLegacy/Os/StartupChecks.cs index 79a2c04..0784629 100644 --- a/CodeLegacy/Os/StartupChecks.cs +++ b/CodeLegacy/Os/StartupChecks.cs @@ -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(); + } + } + } } } diff --git a/CodeLegacy/Ui/UiUtils.cs b/CodeLegacy/Ui/UiUtils.cs index 36c52c1..636cc72 100644 --- a/CodeLegacy/Ui/UiUtils.cs +++ b/CodeLegacy/Ui/UiUtils.cs @@ -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; }