summaryrefslogtreecommitdiffstats
path: root/platform/macos/os_macos.mm
diff options
context:
space:
mode:
authorSpartan322 <Megacake1234@gmail.com>2024-11-12 13:46:08 -0500
committerSpartan322 <Megacake1234@gmail.com>2024-11-12 13:46:59 -0500
commit3a73c6ebd18bff0fa125be58d3ac9c7a63bab61d (patch)
treec7341bd56c977259578b127886c9a88eeef11820 /platform/macos/os_macos.mm
parent5094c2a5f7d506b0e685120f14d1df42e1e9d495 (diff)
parentcb411fa960f0b7fdbd97dcdb4c90f9346360ee0e (diff)
downloadredot-engine-3a73c6ebd18bff0fa125be58d3ac9c7a63bab61d.tar.gz
Merge commit godotengine/godot@cb411fa960f0b7fdbd97dcdb4c90f9346360ee0e
Diffstat (limited to 'platform/macos/os_macos.mm')
-rw-r--r--platform/macos/os_macos.mm9
1 files changed, 9 insertions, 0 deletions
diff --git a/platform/macos/os_macos.mm b/platform/macos/os_macos.mm
index 8b4c3a5360..ec9d9e18c0 100644
--- a/platform/macos/os_macos.mm
+++ b/platform/macos/os_macos.mm
@@ -69,6 +69,15 @@ void OS_MacOS::initialize() {
initialize_core();
}
+String OS_MacOS::get_model_name() const {
+ char buffer[256];
+ size_t buffer_len = 256;
+ if (sysctlbyname("hw.model", &buffer, &buffer_len, nullptr, 0) == 0 && buffer_len != 0) {
+ return String::utf8(buffer, buffer_len);
+ }
+ return OS_Unix::get_model_name();
+}
+
String OS_MacOS::get_processor_name() const {
char buffer[256];
size_t buffer_len = 256;