From 782f6e9330db8882e972e039edf840a90da4ebc2 Mon Sep 17 00:00:00 2001 From: Inuyasha Date: Mon, 2 May 2016 22:25:00 -0700 Subject: [PATCH] dupx and dupy are important for Lua too --- src/lua_hudlib.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/lua_hudlib.c b/src/lua_hudlib.c index c4a72f074..33cc1b367 100644 --- a/src/lua_hudlib.c +++ b/src/lua_hudlib.c @@ -528,6 +528,22 @@ static int libd_height(lua_State *L) return 1; } +static int libd_dupx(lua_State *L) +{ + HUDONLY + lua_pushinteger(L, vid.dupx); // push integral scale (patch scale) + lua_pushfixed(L, vid.fdupx); // push fixed point scale (position scale) + return 2; +} + +static int libd_dupy(lua_State *L) +{ + HUDONLY + lua_pushinteger(L, vid.dupy); // push integral scale (patch scale) + lua_pushfixed(L, vid.fdupy); // push fixed point scale (position scale) + return 2; +} + static int libd_renderer(lua_State *L) { HUDONLY @@ -552,6 +568,8 @@ static luaL_Reg lib_draw[] = { {"getColormap", libd_getColormap}, {"width", libd_width}, {"height", libd_height}, + {"dupx", libd_dupx}, + {"dupy", libd_dupy}, {"renderer", libd_renderer}, {NULL, NULL} };