Posted: Mon Sep 30, 2019 5:11 am Post subject: How to improve the code and use less memory?
Is there a way to improve the following code?
Do I need to use caFree in the all Close events?
Also CE display errors when I close ePSXe, how to get rid of them?
Code:
GameName1 = 'ePSXe ENG.exe'
GameName2 = 'ePSXe.exe'
GameID1 = getProcessIDFromProcessName(GameName1)
GameID2 = getProcessIDFromProcessName(GameName2)
if (GameID1 == nil) and (GameID2 ~= nil) then
openProcess(GameName2)
elseif (GameID1 ~= nil) and (GameID2 == nil) then
openProcess(GameName1)
elseif (GameID1 == nil) and (GameID2 == nil) then
closeCE()
return end
MenuIt[7].OnClick = function(sender111)
closeCE()
end
MenuIt[11].OnClick = function(sender)
closeCE()
end
GameID1 = getProcessIDFromProcessName(GameName1)
GameID2 = getProcessIDFromProcessName(GameName2)
if (GameID1 == nil) and (GameID2 == nil) then
closeCE()
return end
Thanks. Does timer.destroy() need to be added only to the timer event or to MenuItem.OnClick and UDF1.OnClose too?
Does caFree need to be added to MenuItem.OnClick events?
Code:
MenuIt[11].OnClick = function(sender)
closeCE()
end
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum