From e9043c93aaf902638be2deca5ea0dc43633f5957 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Wed, 16 Sep 2015 01:48:15 -0400 Subject: [PATCH] fix lua windows to allow -1 for position again (centers the window) --- src/lua/LuaWindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lua/LuaWindow.cpp b/src/lua/LuaWindow.cpp index 3f15ea8f8..e390ffb92 100644 --- a/src/lua/LuaWindow.cpp +++ b/src/lua/LuaWindow.cpp @@ -61,9 +61,9 @@ LuaWindow::LuaWindow(lua_State * l) : int sizeY = luaL_optinteger(l, 4, 10); // We should replace this with errors - if (posX < 1) + if (posX < 1 && posX != -1) posX = 1; - if (posY < 1) + if (posY < 1 && posY != -1) posY = 1; if (sizeX < 10) sizeX = 10;