diff options
| author | 2021-11-03 20:01:07 -0500 | |
|---|---|---|
| committer | 2021-11-03 20:01:07 -0500 | |
| commit | fe0fbb87c22ddb27569091553d52154bbc1dcc17 (patch) | |
| tree | 24622677dc496fafa745db4c0caa1cd7ee48c08d /plugins/cheat | |
| parent | 18a6113655ee8a34c35a01ff351cbeee47992c11 (diff) | |
plugins: fix cheatfind menu flags and write xml cheat text to ui container so it's not sideways on rotated screens
Diffstat (limited to 'plugins/cheat')
| -rw-r--r-- | plugins/cheat/cheat_xml.lua | 3 | ||||
| -rw-r--r-- | plugins/cheat/init.lua | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/plugins/cheat/cheat_xml.lua b/plugins/cheat/cheat_xml.lua index 32f82d14d9c..07816859cdf 100644 --- a/plugins/cheat/cheat_xml.lua +++ b/plugins/cheat/cheat_xml.lua @@ -172,7 +172,7 @@ function xml.conv_cheat(data) end local function convert_output(data) - local str = "draw_text(screen," + local str = "draw_text(ui," if data["align"] then str = str .. data["align"] else @@ -276,6 +276,7 @@ function xml.conv_cheat(data) if output then data["cheat"][count]["screen"] = {} data["cheat"][count]["screen"]["screen"] = ":screen" + data["cheat"][count]["screen"]["ui"] = "ui" end end return data["cheat"] diff --git a/plugins/cheat/init.lua b/plugins/cheat/init.lua index 41d74ac855a..9193a0ad807 100644 --- a/plugins/cheat/init.lua +++ b/plugins/cheat/init.lua @@ -522,7 +522,9 @@ function cheat.startplugin() if cheat.screen then for name, screen in pairs(cheat.screen) do local scr = manager.machine.screens[screen] - if not scr then + if screen == "ui" then + scr = manager.machine.render.ui_container + elseif not scr then local tag local nxt, coll = manager.machine.screens:pairs() tag, scr = nxt(coll) -- get any screen |
