mirror of
https://github.com/libretro/RetroArch
synced 2025-01-29 09:32:52 +00:00
Implement rarch_get_cpu_cores for Android and Xbox 360
This commit is contained in:
parent
6bb5a08f3e
commit
dade7c4af1
@ -299,6 +299,8 @@ unsigned rarch_get_cpu_cores(void)
|
||||
SYSTEM_INFO sysinfo;
|
||||
GetSystemInfo(&sysinfo);
|
||||
return sysinfo.dwNumberOfProcessors;
|
||||
#elif defined(ANDROID)
|
||||
return android_getCpuCount();
|
||||
#elif defined(_SC_NPROCESSORS_ONLN) // Linux, most unix-likes.
|
||||
long ret = sysconf(_SC_NPROCESSORS_ONLN);
|
||||
if (ret <= 0)
|
||||
@ -321,6 +323,8 @@ unsigned rarch_get_cpu_cores(void)
|
||||
num_cpu = 1;
|
||||
}
|
||||
return num_cpu;
|
||||
#elif defined(_XBOX360)
|
||||
return 3;
|
||||
#else
|
||||
// No idea, assume single core.
|
||||
return 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user