整理代码,修改更新历史

This commit is contained in:
MrZ626
2021-06-16 16:47:56 +08:00
parent 88367fc7a6
commit 41660e4074
3 changed files with 16 additions and 15 deletions

View File

@@ -17,9 +17,9 @@ WS= require"Zframework.websocket"
LOADLIB=require"Zframework.loadLib"
WHEELMOV=require"Zframework.wheelScroll"
JSON=require"Zframework.json"
TABLE=require"Zframework.tableExtend"
STRING=require"Zframework.stringExtend"
JSON= require"Zframework.json"
TABLE= require"Zframework.tableExtend"
STRING= require"Zframework.stringExtend"
VIB= require"Zframework.vibrate"
SFX= require"Zframework.sfx"
@@ -206,7 +206,7 @@ end
local function noDevkeyPressed(key)
if key=="f1"then
PROFILE.switch()
MES.new('check',PROFILE.switch()and"profile start!"or"profile report copied!")
elseif key=="f2"then
MES.new('info',("System:%s[%s]\nluaVer:%s\njitVer:%s\njitVerNum:%s"):format(SYSTEM,jit.arch,_VERSION,jit.version,jit.version_num))
elseif key=="f3"then

View File

@@ -137,16 +137,16 @@ end
local switch=false
function profile.switch()
if switch then
switch=not switch
if not switch then
profile.stop()
love.system.setClipboardText(PROFILE.report())
PROFILE.reset()
MES.new('check',"profile report copied!")
return false
else
PROFILE.start()
MES.new('check',"profile start!")
return true
end
switch=not switch
end
-- store all internal profiler functions