Bläddra i källkod

Add passive aggressive error message if no device

jp9000 6 år sedan
förälder
incheckning
45a7aca993
1 ändrade filer med 6 tillägg och 0 borttagningar
  1. 6 0
      libobs-metal/metal-device.mm

+ 6 - 0
libobs-metal/metal-device.mm

@@ -21,6 +21,12 @@ void gs_device::InitDevice(uint32_t deviceIdx)
 		}
 	}
 
+	if (device == nil)
+		throw "Well I guess there's no device, try using OpenGL "
+		      "rather than this awful apple API that they made "
+		      "with the sole purpose of making developer's lives "
+		      "difficult.";
+
 	blog(LOG_INFO, "Loading up Metal on adapter %s (%" PRIu32 ")",
 			device.name.UTF8String, deviceIdx);