Upon successful completion, 0 is returned for sysctlbyname

This commit is contained in:
twinaphex 2016-01-19 18:45:22 +01:00
parent c4fabd65a1
commit e048cfe016

View File

@ -549,9 +549,9 @@ uint64_t retro_get_cpu_features(void)
#elif defined(__MACH__)
size_t len = sizeof(size_t);
size_t alt_len = sizeof(size_t);
if (!sysctlbyname("hw.optional.altivec", NULL, &alt_len, NULL, 0))
if (sysctlbyname("hw.optional.altivec", NULL, &alt_len, NULL, 0) == 0)
cpu |= RETRO_SIMD_VMX;
if (!sysctlbyname("hw.optional.neon", NULL, &len, NULL, 0))
if (sysctlbyname("hw.optional.neon", NULL, &len, NULL, 0) == 0)
cpu |= RETRO_SIMD_NEON;
#elif defined(__linux__)
cpu_flags = linux_get_cpu_features();