内存过低的提示每次启动最多出现三次
This commit is contained in:
@@ -388,11 +388,11 @@ end
|
|||||||
function love.directorydropped(dir)
|
function love.directorydropped(dir)
|
||||||
if SCN.directoryDropped then SCN.directoryDropped(dir)end
|
if SCN.directoryDropped then SCN.directoryDropped(dir)end
|
||||||
end
|
end
|
||||||
local lastGCtime=0
|
local autoGCcount=0
|
||||||
function love.lowmemory()
|
function love.lowmemory()
|
||||||
if love.timer.getTime()-lastGCtime>6.26 then
|
collectgarbage()
|
||||||
collectgarbage()
|
if autoGCcount<3 then
|
||||||
lastGCtime=love.timer.getTime()
|
autoGCcount=autoGCcount+1
|
||||||
MES.new('check',"[auto GC] low MEM 设备内存过低")
|
MES.new('check',"[auto GC] low MEM 设备内存过低")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user