summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/layout/mdndclab.lay
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/layout/mdndclab.lay')
-rw-r--r--src/mame/layout/mdndclab.lay14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mame/layout/mdndclab.lay b/src/mame/layout/mdndclab.lay
index fe8c95d9883..1f3b68a26e0 100644
--- a/src/mame/layout/mdndclab.lay
+++ b/src/mame/layout/mdndclab.lay
@@ -29,11 +29,11 @@ license:CC0
return nil
end
last_state = true
- local h = target:height()
- local w = target:width()
- local x0, x1, y0, y1 = target:view_bounds()
- local vw = (x1 - x0)
- local vh = (y1 - y0)
+ local h = target.height
+ local w = target.width
+ local vb = target.current_view.bounds
+ local vw = (vb.x1 - vb.x0)
+ local vh = (vb.y1 - vb.y0)
if machine:options().entries.keepaspect:value() then
if (vh / h) < (vw / w) then
local oh = h
@@ -46,8 +46,8 @@ license:CC0
end
end
- x = ((x / w) * vw) + x0
- y = ((y / h) * vh) + y0
+ x = ((x / w) * vw) + vb.x0
+ y = ((y / h) * vh) + vb.y0
return x, y
end