mirror of
https://github.com/TomHarte/CLK.git
synced 2025-08-15 14:27:29 +00:00
Eliminate purposeless instance storage.
This commit is contained in:
@@ -11,16 +11,11 @@ import Cocoa
|
|||||||
@NSApplicationMain
|
@NSApplicationMain
|
||||||
class AppDelegate: NSObject, NSApplicationDelegate {
|
class AppDelegate: NSObject, NSApplicationDelegate {
|
||||||
|
|
||||||
private var failedMetalCheck = false
|
|
||||||
func applicationDidFinishLaunching(_ notification: Notification) {
|
func applicationDidFinishLaunching(_ notification: Notification) {
|
||||||
// Insert code here to initialize your application.
|
|
||||||
|
|
||||||
// Check for at least one Metal-capable GPU; this check
|
// Check for at least one Metal-capable GPU; this check
|
||||||
// will become unnecessary if/when the minimum OS version
|
// will become unnecessary if/when the minimum OS version
|
||||||
// that this project supports reascends to 10.14.
|
// that this project supports reascends to 10.14.
|
||||||
if (MTLCopyAllDevices().count == 0) {
|
if (MTLCopyAllDevices().count == 0) {
|
||||||
self.failedMetalCheck = true
|
|
||||||
|
|
||||||
let alert = NSAlert()
|
let alert = NSAlert()
|
||||||
alert.messageText = "This application requires a Metal-capable GPU"
|
alert.messageText = "This application requires a Metal-capable GPU"
|
||||||
alert.addButton(withTitle: "Exit")
|
alert.addButton(withTitle: "Exit")
|
||||||
|
Reference in New Issue
Block a user