363 lines
8.1 KiB
Lua
363 lines
8.1 KiB
Lua
--文件是自动生成,请勿手动修改.来自数据文件:DeviceMatchConfig
|
|
local L_CompressMaxColumn = 1
|
|
local L_CompressData = {
|
|
4338245121,
|
|
--1,Vivante GC4000,1,0,0,1,,
|
|
4338245378,
|
|
--2,Vivante GC2000,1,0,0,1,,
|
|
4338245635,
|
|
--3,Vivante GC1000,1,0,0,1,,
|
|
4338245892,
|
|
--4,Vivante GC800,1,0,0,1,,
|
|
4338246149,
|
|
--5,Vivante GC600,1,0,0,1,,
|
|
4338246406,
|
|
--6,Vivante GC400,1,0,0,1,,
|
|
4338246663,
|
|
--7,Tegra X1,1,0,0,1,,
|
|
4338246920,
|
|
--8,Tegra K1,1,0,0,1,,
|
|
4338247177,
|
|
--9,Tegra 4,1,0,0,1,,
|
|
4338247434,
|
|
--10,Tegra 3,1,0,0,1,,
|
|
4338247691,
|
|
--11,Tegra 2,1,0,0,1,,
|
|
4472465676,
|
|
--12,PowerVR GT7400 Plus,1,1,0,1,,
|
|
4472465933,
|
|
--13,PowerVR GM9446,1,1,0,1,,
|
|
4472466190,
|
|
--14,PowerVR GE8320,1,1,0,1,,
|
|
43281423,
|
|
--15,PowerVR GE8300,1,0,0,0,,
|
|
43281680,
|
|
--16,PowerVR GE8100,1,0,0,0,,
|
|
43281937,
|
|
--17,PowerVR G6200,1,0,0,0,,
|
|
43282194,
|
|
--18,PowerVR 6200,1,0,0,0,,
|
|
43282451,
|
|
--19,PowerVR SGX544 MP,1,0,0,0,,
|
|
43282708,
|
|
--20,PowerVR SGX531 Ultra,1,0,0,0,,
|
|
43282965,
|
|
--21,PowerVR SGX531,1,0,0,0,,
|
|
43283222,
|
|
--22,PowerVR SGX544MP3,1,0,0,0,,
|
|
43283479,
|
|
--23,PowerVR SGX540,1,0,0,0,,
|
|
43283736,
|
|
--24,PowerVR SGX535,1,0,0,0,,
|
|
43283993,
|
|
--25,PowerVR MBX-Lite,1,0,0,0,,
|
|
4606687002,
|
|
--26,Mali-G78,1,2,0,1,,
|
|
4606687259,
|
|
--27,Mali-G77,1,2,0,1,,
|
|
4606687260,
|
|
--28,Mali-G77,1,2,0,1,,
|
|
4606687517,
|
|
--29,Mali-G76,1,2,0,1,,
|
|
4472470046,
|
|
--30,Mali-G72,1,1,0,1,,
|
|
4472470303,
|
|
--31,Mali-G71,1,1,0,1,,
|
|
4472470560,
|
|
--32,Mali-T880,1,1,0,1,,
|
|
43285793,
|
|
--33,Mali-T860,1,0,0,0,,
|
|
43286050,
|
|
--34,Mali-T830,1,0,0,0,,
|
|
43286307,
|
|
--35,Mali-T760,1,0,0,0,,
|
|
43286564,
|
|
--36,Mali-T720,1,0,0,0,,
|
|
43286821,
|
|
--37,Mali-T628,1,0,0,0,,
|
|
43287078,
|
|
--38,Mali-T624,1,0,0,0,,
|
|
43287335,
|
|
--39,Mali-T604,1,0,0,0,,
|
|
43287592,
|
|
--40,Mali-450,1,0,0,0,,
|
|
43287849,
|
|
--41,Mali-400,1,0,0,0,,
|
|
4472473130,
|
|
--42,Mali-G52,1,1,0,1,,
|
|
4472473387,
|
|
--43,Mali-G51,1,1,0,1,,
|
|
4606691372,
|
|
--44,Adreno 650,1,2,0,1,,
|
|
4606691629,
|
|
--45,Adreno 640,1,2,0,1,,
|
|
4606691886,
|
|
--46,Adreno 630,1,2,0,1,,
|
|
4472474415,
|
|
--47,Adreno 620,1,1,0,1,,
|
|
4472474672,
|
|
--48,Adreno 618,1,1,0,1,,
|
|
4472474929,
|
|
--49,Adreno 616,1,1,0,1,,
|
|
4472475186,
|
|
--50,Adreno 615,1,1,0,1,,
|
|
4472475443,
|
|
--51,Adreno 612,1,1,0,1,,
|
|
4472475700,
|
|
--52,Adreno 610,1,1,0,1,,
|
|
4472475957,
|
|
--53,Adreno 540,1,1,0,1,,
|
|
4472476214,
|
|
--54,Adreno 530,1,1,0,1,,
|
|
4472476471,
|
|
--55,Adreno 512,1,1,0,1,,
|
|
4338259000,
|
|
--56,Adreno 510,1,0,0,1,,
|
|
4338259257,
|
|
--57,Adreno 509,1,0,0,1,,
|
|
4338259514,
|
|
--58,Adreno 508,1,0,0,1,,
|
|
4338259771,
|
|
--59,Adreno 506,1,0,0,1,,
|
|
4338260028,
|
|
--60,Adreno 505,1,0,0,1,,
|
|
4338260285,
|
|
--61,Adreno 504,1,0,0,1,,
|
|
4338260542,
|
|
--62,Adreno 430,1,0,0,1,,
|
|
4338260799,
|
|
--63,Adreno 420,1,0,0,1,,
|
|
4338261056,
|
|
--64,Adreno 418,1,0,0,1,,
|
|
4338261313,
|
|
--65,Adreno 405,1,0,0,1,,
|
|
4338261570,
|
|
--66,Adreno 330,1,0,0,1,,
|
|
4338261827,
|
|
--67,Adreno 320,1,0,0,1,,
|
|
43294788,
|
|
--68,Adreno 308,1,0,0,0,,
|
|
43295045,
|
|
--69,Adreno 306,1,0,0,0,,
|
|
43295302,
|
|
--70,Adreno 305,1,0,0,0,,
|
|
43295559,
|
|
--71,Adreno 304,1,0,0,0,,
|
|
43295816,
|
|
--72,Adreno 302,1,0,0,0,,
|
|
43296073,
|
|
--73,Adreno 225,1,0,0,0,,
|
|
43296330,
|
|
--74,Adreno 220,1,0,0,0,,
|
|
43296587,
|
|
--75,Adreno 205,1,0,0,0,,
|
|
43296844,
|
|
--76,Adreno 203,1,0,0,0,,
|
|
43297101,
|
|
--77,Adreno 200,1,0,0,0,,
|
|
4573145678,
|
|
--78,iPad14,0,2,0,1,,
|
|
4573145935,
|
|
--79,iPad13,0,2,0,1,,
|
|
4573146192,
|
|
--80,iPad12,0,2,0,1,,
|
|
4573146449,
|
|
--81,iPad11,0,2,0,1,,
|
|
4573146706,
|
|
--82,iPad8,0,2,0,1,,
|
|
4573146963,
|
|
--83,iPad7,0,2,0,1,,
|
|
4438929492,
|
|
--84,iPad6,0,1,0,1,,
|
|
4438929749,
|
|
--85,iPad5,0,1,0,1,,
|
|
9744982,
|
|
--86,iPad4,0,0,0,0,,
|
|
9745239,
|
|
--87,iPad3,0,0,0,0,,
|
|
9745496,
|
|
--88,iPad2,0,0,0,0,,
|
|
9745753,
|
|
--89,iPad1,0,0,0,0,,
|
|
9746010,
|
|
--90,iPod9,0,0,0,0,,
|
|
9746267,
|
|
--91,iPod7,0,0,0,0,,
|
|
9746524,
|
|
--92,iPod5,0,0,0,0,,
|
|
9746781,
|
|
--93,iPod4,0,0,0,0,,
|
|
9747038,
|
|
--94,iPod3,0,0,0,0,,
|
|
9747295,
|
|
--95,iPod2,0,0,0,0,,
|
|
4304714848,
|
|
--96,iPod1,0,0,0,1,,
|
|
4573150561,
|
|
--97,iPhone16,0,2,0,1,,
|
|
4573150818,
|
|
--98,iPhone15,0,2,0,1,,
|
|
4573151075,
|
|
--99,iPhone14,0,2,0,1,,
|
|
4573151332,
|
|
--100,iPhone13,0,2,0,1,,
|
|
4573151589,
|
|
--101,iPhone12,0,2,0,1,,
|
|
4573151846,
|
|
--102,iPhone11,0,2,0,1,,
|
|
4573152103,
|
|
--103,iPhone10,0,2,0,1,,
|
|
4438934632,
|
|
--104,iPhone9,0,1,0,1,,
|
|
4438934889,
|
|
--105,iPhone8,0,1,0,1,,
|
|
9750122,
|
|
--106,iPhone7,0,0,0,0,,
|
|
9750379,
|
|
--107,iPhone6,0,0,0,0,,
|
|
9750636,
|
|
--108,iPhone5,0,0,0,0,,
|
|
9750893,
|
|
--109,iPhone4,0,0,0,0,,
|
|
9751150,
|
|
--110,iPhone3,0,0,0,0,,
|
|
9751407,
|
|
--111,iPhone2,0,0,0,0,,
|
|
9751664,
|
|
--112,iPhone1,0,0,0,0,,
|
|
9751921,
|
|
--113,x86_64,0,0,0,0,,
|
|
9752178,
|
|
--114,i386,0,0,0,0,,
|
|
}
|
|
local L_MainKeyDic = {
|
|
[1]=1,[2]=2,[3]=3,[4]=4,[5]=5,[6]=6,[7]=7,[8]=8,[9]=9,[10]=10,[11]=11,[12]=12,[13]=13,[14]=14,[15]=15,
|
|
[16]=16,[17]=17,[18]=18,[19]=19,[20]=20,[21]=21,[22]=22,[23]=23,[24]=24,[25]=25,[26]=26,[27]=27,[28]=28,[29]=29,[30]=30,
|
|
[31]=31,[32]=32,[33]=33,[34]=34,[35]=35,[36]=36,[37]=37,[38]=38,[39]=39,[40]=40,[41]=41,[42]=42,[43]=43,[44]=44,[45]=45,
|
|
[46]=46,[47]=47,[48]=48,[49]=49,[50]=50,[51]=51,[52]=52,[53]=53,[54]=54,[55]=55,[56]=56,[57]=57,[58]=58,[59]=59,[60]=60,
|
|
[61]=61,[62]=62,[63]=63,[64]=64,[65]=65,[66]=66,[67]=67,[68]=68,[69]=69,[70]=70,[71]=71,[72]=72,[73]=73,[74]=74,[75]=75,
|
|
[76]=76,[77]=77,[78]=78,[79]=79,[80]=80,[81]=81,[82]=82,[83]=83,[84]=84,[85]=85,[86]=86,[87]=87,[88]=88,[89]=89,[90]=90,
|
|
[91]=91,[92]=92,[93]=93,[94]=94,[95]=95,[96]=96,[97]=97,[98]=98,[99]=99,[100]=100,[101]=101,[102]=102,[103]=103,[104]=104,[105]=105,
|
|
[106]=106,[107]=107,[108]=108,[109]=109,[110]=110,[111]=111,[112]=112,[113]=113,[114]=114,}
|
|
local L_NamesByNum = {
|
|
Id = 1,
|
|
DeviceType = 3,
|
|
Level = 4,
|
|
MatchCPU = 5,
|
|
UseFlow = 6,
|
|
}
|
|
local L_NamesByString = {
|
|
DeviceName = 2,
|
|
}
|
|
local L_ColNameIndexs = {
|
|
Id = 0,
|
|
DeviceName = 1,
|
|
DeviceType = 2,
|
|
Level = 3,
|
|
MatchCPU = 4,
|
|
UseFlow = 5,
|
|
}
|
|
--local L_ColumnUseBitCount = {8,17,2,3,2,2,}
|
|
--local L_ColumnList = {1,1,1,1,1,1,}
|
|
--local L_ShiftDataList = {0,8,25,27,30,32,}
|
|
--local L_AndDataList = {127,65535,1,3,1,1,}
|
|
local L_ColumnShiftAndList = {1,0,127,1,8,65535,1,25,1,1,27,3,1,30,1,1,32,1,}
|
|
local L_ColNum = 6;
|
|
local L_UseDataK = setmetatable({ },{ __mode = 'k'});
|
|
local L_UseDataV = setmetatable({ },{ __mode = 'v'});
|
|
local L_UseDataRow = setmetatable({ },{ __mode = 'v'});
|
|
local L_IsCache = false;
|
|
local mt = {}
|
|
local function GetData(row, column)
|
|
local startIndex = (column - 1) * 3
|
|
local _compressData = L_CompressData[row]
|
|
local _tempData = _compressData >> L_ColumnShiftAndList[startIndex + 2]
|
|
local _data = _tempData & L_ColumnShiftAndList[startIndex + 3]
|
|
local _andSign = L_ColumnShiftAndList[startIndex + 3] + 1
|
|
local _isMinus = (_andSign & _tempData) == _andSign
|
|
return _isMinus and -_data or _data;
|
|
end
|
|
|
|
mt.__index = function (t,key)
|
|
local _key = L_UseDataK[t];
|
|
local _row = L_MainKeyDic[_key];
|
|
local _column = L_NamesByNum[key];
|
|
if _column ~= nil then
|
|
if L_IsCache then
|
|
local _data = L_UseDataRow[_row * L_ColNum + _column]
|
|
if not _data then
|
|
_data = GetData(_row, _column)
|
|
L_UseDataRow[_row * L_ColNum + _column] = _data
|
|
end
|
|
return _data
|
|
else
|
|
return GetData(_row, _column)
|
|
end
|
|
end
|
|
_column = L_NamesByString[key]
|
|
if _column ~= nil then
|
|
return StringDefines[GetData(_row, _column)]
|
|
end
|
|
if string.find(key, '_') then
|
|
local _newKey = string.gsub(key, '_', '')
|
|
_column = L_NamesByString[_newKey]
|
|
if _column ~= nil then
|
|
return GetData(_row, _column)
|
|
end
|
|
end
|
|
if key ~= '_OnCopyAfter_' then
|
|
return
|
|
end
|
|
end
|
|
|
|
local M = {
|
|
_CompressData_ = L_CompressData,
|
|
_ColumnShiftAndList_ = L_ColumnShiftAndList,
|
|
_CompressMaxColumn_ = L_CompressMaxColumn,
|
|
_ColumnNameIndexs_ = L_ColNameIndexs,
|
|
Count = 114
|
|
}
|
|
|
|
function M:Foreach(func)
|
|
for i=1,M.Count do
|
|
local _key = GetData(i, 1)
|
|
func(_key, M[_key])
|
|
end
|
|
end
|
|
|
|
function M:ForeachCanBreak(func)
|
|
for i = 1,M.Count do
|
|
local _key = GetData(i, 1)
|
|
if func(_key, M[_key]) then
|
|
break
|
|
end
|
|
end
|
|
end
|
|
|
|
function M:GetByIndex(index)
|
|
return M[GetData(index, 1)];
|
|
end
|
|
|
|
function M:IsContainKey(key)
|
|
return not(not L_MainKeyDic[key]);
|
|
end
|
|
|
|
function M:SetIsCache(isCh)
|
|
L_IsCache = isCh;
|
|
end
|
|
|
|
setmetatable(M, {__index = function(t, key)
|
|
if not L_MainKeyDic[key] then
|
|
return;
|
|
end
|
|
local _t = L_UseDataV[key];
|
|
if not _t then
|
|
_t = setmetatable({}, mt);
|
|
L_UseDataV[key] = _t;
|
|
L_UseDataK[_t] = key;
|
|
end
|
|
return _t
|
|
end})
|
|
|
|
return M
|