mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-22 02:38:11 +00:00
(Apple) Cleanups
This commit is contained in:
parent
a642092cb5
commit
6bbe6203a6
@ -146,13 +146,16 @@ static void checkps(CFDictionaryRef dict, bool * have_ac, bool * have_battery,
|
|||||||
|
|
||||||
static void frontend_apple_get_name(char *name, size_t sizeof_name)
|
static void frontend_apple_get_name(char *name, size_t sizeof_name)
|
||||||
{
|
{
|
||||||
#ifdef IOS
|
#if defined(IOS)
|
||||||
struct utsname buffer;
|
struct utsname buffer;
|
||||||
|
|
||||||
if (uname(&buffer) != 0)
|
if (uname(&buffer) != 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
strlcpy(name, buffer.machine, sizeof_name);
|
strlcpy(name, buffer.machine, sizeof_name);
|
||||||
|
#elif defined(OSX)
|
||||||
|
size_t length = 0;
|
||||||
|
sysctlbyname("hw.model", name, &length, NULL, 0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -163,9 +166,11 @@ static void frontend_apple_get_os(char *name, size_t sizeof_name, int *major, in
|
|||||||
(void)major;
|
(void)major;
|
||||||
(void)minor;
|
(void)minor;
|
||||||
|
|
||||||
#ifdef IOS
|
#if defined(IOS)
|
||||||
get_ios_version(major, minor);
|
get_ios_version(major, minor);
|
||||||
strlcpy(name, "iOS", sizeof_name);
|
strlcpy(name, "iOS", sizeof_name);
|
||||||
|
#elif defined(OSX)
|
||||||
|
strlcpy(name, "OSX", sizeof_name);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user