Hardware platform detection for non arm devices fixed.
This commit is contained in:
parent
c8b658fdb6
commit
ee144852f2
@ -134,7 +134,7 @@ bool CommonPackageManager::IsVersionCompatible(const std::string& target_version
|
|||||||
// major version is the same and minor package version is above or the same as target.
|
// major version is the same and minor package version is above or the same as target.
|
||||||
if ((package_version[0] == target_version[0]) && (package_version[1] == target_version[1]) && (package_version[2] >= target_version[2]))
|
if ((package_version[0] == target_version[0]) && (package_version[1] == target_version[1]) && (package_version[2] >= target_version[2]))
|
||||||
{
|
{
|
||||||
result = true;
|
result = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@ -144,13 +144,21 @@ int CommonPackageManager::GetHardwareRating(int platform, int cpu_id, const std:
|
|||||||
{
|
{
|
||||||
int result = -1;
|
int result = -1;
|
||||||
|
|
||||||
for (size_t i = 0; i < group.size(); i++)
|
if ((cpu_id & ARCH_X86) || (cpu_id & ARCH_X64) || (cpu_id & ARCH_MIPS))
|
||||||
|
// Note: No raiting for x86, x64 and MIPS
|
||||||
|
// only one package is used
|
||||||
|
result = 0;
|
||||||
|
else
|
||||||
{
|
{
|
||||||
if (group[i] == std::pair<int, int>(platform, cpu_id))
|
// Calculate rating for Arm
|
||||||
{
|
for (size_t i = 0; i < group.size(); i++)
|
||||||
result = i;
|
{
|
||||||
break;
|
if (group[i] == std::pair<int, int>(platform, cpu_id))
|
||||||
}
|
{
|
||||||
|
result = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user