summaryrefslogtreecommitdiffstatshomepage
path: root/plugins/cheat/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/cheat/init.lua')
-rw-r--r--plugins/cheat/init.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/cheat/init.lua b/plugins/cheat/init.lua
index 6901986b92b..dd4186cf1be 100644
--- a/plugins/cheat/init.lua
+++ b/plugins/cheat/init.lua
@@ -81,6 +81,7 @@ function cheat.startplugin()
local stop = true
local cheatname = ""
local consolelog = nil
+ local consolelast = 0
local watches = {}
local breaks = {}
@@ -255,7 +256,7 @@ function cheat.startplugin()
local function periodiccb()
local msg = consolelog[#consolelog]
- if msg:find("Stopped at", 1, true) then
+ if #consolelog > consolelast and msg:find("Stopped at", 1, true) then
local point = msg:match("Stopped at breakpoint ([0-9]+)")
if not point then
point = msg:match("Stopped at watchpoint ([0-9]+")
@@ -277,6 +278,7 @@ function cheat.startplugin()
manager:machine():debugger().execution_state = "run"
end
end
+ consolelast = #consolelog
end
local function bpset(cheat, dev, addr, func)
@@ -693,6 +695,7 @@ function cheat.startplugin()
load_hotkeys()
if manager:machine():debugger() then
consolelog = manager:machine():debugger().consolelog
+ consolelast = 0
end
end)