mirror of
https://github.com/holub/mame
synced 2025-10-04 08:28:39 +03:00
luaengine: fix ui (nw)
This commit is contained in:
parent
8ade169794
commit
21c89e6258
@ -73,8 +73,7 @@ function cheat.startplugin()
|
||||
local filename = emu.romname()
|
||||
local json = require("json")
|
||||
local newcheats = {}
|
||||
local path = manager:machine():options().entries.cheatpath:value():gsub("([^;]+)", "%1;%1/cheat")
|
||||
local file = emu.file(path, 1)
|
||||
local file = emu.file(manager:machine():options().entries.cheatpath:value():gsub("([^;]+)", "%1;%1/cheat") , 1)
|
||||
if emu.softname() ~= "" then
|
||||
for name, image in pairs(manager:machine().images) do
|
||||
if image:exists() and image:software_list_name() ~= "" then
|
||||
@ -116,7 +115,7 @@ function cheat.startplugin()
|
||||
return
|
||||
end
|
||||
if type(x) == "string" then
|
||||
y = y * manager:machine():ui():get_line_height()
|
||||
y = y * mame_manager:ui():get_line_height()
|
||||
end
|
||||
output[#output + 1] = { type = "text", scr = screen, x = x, y = y, str = str, color = color }
|
||||
end
|
||||
|
@ -512,7 +512,7 @@ function cheatfind.startplugin()
|
||||
emu.register_menu(menu_callback, menu_populate, "Cheat Finder")
|
||||
emu.register_frame_done(function ()
|
||||
local tag, screen = next(manager:machine().screens)
|
||||
local height = manager:machine():ui():get_line_height()
|
||||
local height = mame_manager:ui():get_line_height()
|
||||
for num, watch in ipairs(watches) do
|
||||
screen:draw_text("left", num * height, string.format("%08x %08x", watch.addr, watch.func()))
|
||||
end
|
||||
|
@ -2176,6 +2176,7 @@ void lua_engine::initialize()
|
||||
.beginClass <mame_machine_manager> ("mame_manager")
|
||||
.addFunction ("plugins", &mame_machine_manager::plugins)
|
||||
.addFunction ("cheat", &mame_machine_manager::cheat)
|
||||
.addFunction ("ui", &mame_machine_manager::ui)
|
||||
.endClass ()
|
||||
.beginClass <lua_machine> ("lua_machine")
|
||||
.addCFunction ("popmessage", &lua_machine::l_popmessage)
|
||||
@ -2189,7 +2190,6 @@ void lua_engine::initialize()
|
||||
.addFunction ("load", &running_machine::schedule_load)
|
||||
.addFunction ("system", &running_machine::system)
|
||||
.addFunction ("video", &running_machine::video)
|
||||
.addFunction ("ui", &running_machine::ui)
|
||||
.addFunction ("render", &running_machine::render)
|
||||
.addFunction ("ioport", &running_machine::ioport)
|
||||
.addFunction ("parameters", &running_machine::parameters)
|
||||
|
Loading…
Reference in New Issue
Block a user