parse SOCVendor/GPUVendor needs len param.
This commit is contained in:
parent
5e8b83cce4
commit
c9a1298e02
@ -41,7 +41,7 @@ namespace hgl
|
||||
"JLQ",
|
||||
};
|
||||
|
||||
const SOCVendor ParseSOCVendor(const char *str);
|
||||
const SOCVendor ParseSOCVendor(const char *str,const int len=0);
|
||||
|
||||
enum class CpuArch
|
||||
{
|
||||
@ -173,7 +173,7 @@ namespace hgl
|
||||
"Maleoon",
|
||||
};
|
||||
|
||||
const SOCGPUVendor ParseSOCGPUVendor(const char *str);
|
||||
const SOCGPUVendor ParseSOCGPUVendor(const char *str,const int len=0);
|
||||
|
||||
struct SOCGPUInfo
|
||||
{
|
||||
|
@ -127,7 +127,6 @@ IF(CM_PLATFORM_SOC)
|
||||
SET(SOC_SOURCE ${CMPLATFORM_ROOT_INCLUDE_PATH}/hgl/platform/SOC.h
|
||||
SOC/SOC.cpp
|
||||
SOC/ARMCpuInfo.cpp
|
||||
SOC/Kryo.cpp
|
||||
)
|
||||
|
||||
SOURCE_GROUP("SOC" FILES ${SOC_SOURCE})
|
||||
|
@ -150,11 +150,11 @@ namespace
|
||||
|
||||
namespace hgl
|
||||
{
|
||||
const SOCVendor ParseSOCVendor(const char *str)
|
||||
const SOCVendor ParseSOCVendor(const char *str,const int len)
|
||||
{
|
||||
if(!str||!*str)return(SOCVendor::Unknow);
|
||||
|
||||
int index=hgl::find_str_in_array<char>(int(SOCVendor::RANGE_SIZE),(const char **)SOCVendorName,str);
|
||||
int index=hgl::find_str_in_array<char>(int(SOCVendor::RANGE_SIZE),(const char **)SOCVendorName,str,len);
|
||||
|
||||
if(index<0||index>=int(SOCVendor::RANGE_SIZE))
|
||||
return(SOCVendor::Unknow);
|
||||
@ -162,11 +162,11 @@ namespace hgl
|
||||
return SOCVendor(index);
|
||||
}
|
||||
|
||||
const SOCGPUVendor ParseSOCGPUVendor(const char *str)
|
||||
const SOCGPUVendor ParseSOCGPUVendor(const char *str,const int len)
|
||||
{
|
||||
if(!str||!*str)return(SOCGPUVendor::Unknow);
|
||||
|
||||
int index=hgl::find_str_in_array<char>(int(SOCGPUVendor::RANGE_SIZE),(const char **)SOCGPUVendorName,str);
|
||||
int index=hgl::find_str_in_array<char>(int(SOCGPUVendor::RANGE_SIZE),(const char **)SOCGPUVendorName,str,len);
|
||||
|
||||
if(index<0||index>=int(SOCGPUVendor::RANGE_SIZE))
|
||||
return(SOCGPUVendor::Unknow);
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include<Windows.h>
|
||||
#include<hgl/platform/Platform.h>
|
||||
#include<hgl/text/FontInfo.h>
|
||||
#include<hgl/type/StrChar.h>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user