mirror of
https://github.com/libretro/RetroArch
synced 2025-04-11 00:44:20 +00:00
(Apple) Fixup get_os
This commit is contained in:
parent
0608ea17b8
commit
c03f61152b
@ -25,6 +25,8 @@
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include <sys/utsname.h>
|
||||||
|
|
||||||
#if defined(OSX)
|
#if defined(OSX)
|
||||||
#include <Carbon/Carbon.h>
|
#include <Carbon/Carbon.h>
|
||||||
#include <IOKit/ps/IOPowerSources.h>
|
#include <IOKit/ps/IOPowerSources.h>
|
||||||
@ -256,7 +258,7 @@ static void frontend_apple_get_os(char *name, size_t sizeof_name, int *major, in
|
|||||||
|
|
||||||
#ifdef IOS
|
#ifdef IOS
|
||||||
get_ios_version(major, minor);
|
get_ios_version(major, minor);
|
||||||
snprintf(name, sizeof_name, "iOS %d.%d", *major, *minor);
|
strlcpy(name, "iOS", sizeof_name);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -466,7 +468,20 @@ end:
|
|||||||
|
|
||||||
enum frontend_architecture frontend_apple_get_architecture(void)
|
enum frontend_architecture frontend_apple_get_architecture(void)
|
||||||
{
|
{
|
||||||
/* stub */
|
struct utsname buffer;
|
||||||
|
|
||||||
|
if (uname(&buffer) != 0)
|
||||||
|
return FRONTEND_ARCH_NONE;
|
||||||
|
|
||||||
|
#ifdef OSX
|
||||||
|
if (!strcmp(buffer.machine, "x86_64"))
|
||||||
|
return FRONTEND_ARCH_X86_64;
|
||||||
|
if (!strcmp(buffer.machine, "x86"))
|
||||||
|
return FRONTEND_ARCH_X86;
|
||||||
|
if (!strcmp(buffer.machine, "Power Macintosh"))
|
||||||
|
return FRONTEND_ARCH_PPC;
|
||||||
|
#endif
|
||||||
|
|
||||||
return FRONTEND_ARCH_NONE;
|
return FRONTEND_ARCH_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user