Skip to content

Commit

Permalink
device: Add architecture name
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiosky committed Oct 10, 2024
1 parent d71ef77 commit 140bc63
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1542,6 +1542,14 @@ impl Device {
}

impl DeviceRef {
pub fn architecture_name(&self) -> &str {
unsafe {
let arch: *const NSObject = msg_send![self, architecture];
let name = msg_send![arch, name];
crate::nsstring_as_str(name)
}
}

pub fn name(&self) -> &str {
unsafe {
let name = msg_send![self, name];
Expand Down

0 comments on commit 140bc63

Please sign in to comment.