From efc71a7c3bef599e0e6e600b11e4347deb47ed67 Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Thu, 27 Dec 2018 03:23:13 +0100 Subject: [PATCH] Expose missing MTLDevice::is_removable --- src/device.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/device.rs b/src/device.rs index 8ebed06b..ea4a4267 100644 --- a/src/device.rs +++ b/src/device.rs @@ -1407,6 +1407,16 @@ impl DeviceRef { } } + pub fn is_removable(&self) -> bool { + unsafe { + match msg_send![self, isRemovable] { + YES => true, + NO => false, + _ => unreachable!() + } + } + } + pub fn supports_feature_set(&self, feature: MTLFeatureSet) -> bool { unsafe { match msg_send![self, supportsFeatureSet:feature] {