aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_mainmenu.cpp
diff options
context:
space:
mode:
authorSmallJoker <SmallJoker@users.noreply.github.com>2021-03-30 21:49:15 +0200
committerGitHub <noreply@github.com>2021-03-30 21:49:15 +0200
commitf4118a4fdebe5c8a4a467afe5b3f49a0bd74c37a (patch)
treef6eb56306a23b3e2c3d31dae5c3c9522bfb15b44 /src/script/lua_api/l_mainmenu.cpp
parentf345d00a436b88e6583896065aab237ff12a9d3d (diff)
downloadminetest-f4118a4fdebe5c8a4a467afe5b3f49a0bd74c37a.tar.gz
minetest-f4118a4fdebe5c8a4a467afe5b3f49a0bd74c37a.tar.bz2
minetest-f4118a4fdebe5c8a4a467afe5b3f49a0bd74c37a.zip
Consistent title bar + render information in mainmenu (#10764)
Diffstat (limited to 'src/script/lua_api/l_mainmenu.cpp')
-rw-r--r--src/script/lua_api/l_mainmenu.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/script/lua_api/l_mainmenu.cpp b/src/script/lua_api/l_mainmenu.cpp
index ba7f708a4..6826ece05 100644
--- a/src/script/lua_api/l_mainmenu.cpp
+++ b/src/script/lua_api/l_mainmenu.cpp
@@ -856,14 +856,6 @@ int ModApiMainMenu::l_get_screen_info(lua_State *L)
lua_pushnumber(L,RenderingEngine::getDisplayDensity());
lua_settable(L, top);
- lua_pushstring(L,"display_width");
- lua_pushnumber(L,RenderingEngine::getDisplaySize().X);
- lua_settable(L, top);
-
- lua_pushstring(L,"display_height");
- lua_pushnumber(L,RenderingEngine::getDisplaySize().Y);
- lua_settable(L, top);
-
const v2u32 &window_size = RenderingEngine::get_instance()->getWindowSize();
lua_pushstring(L,"window_width");
lua_pushnumber(L, window_size.X);
@@ -872,6 +864,10 @@ int ModApiMainMenu::l_get_screen_info(lua_State *L)
lua_pushstring(L,"window_height");
lua_pushnumber(L, window_size.Y);
lua_settable(L, top);
+
+ lua_pushstring(L, "render_info");
+ lua_pushstring(L, wide_to_utf8(RenderingEngine::get_video_driver()->getName()).c_str());
+ lua_settable(L, top);
return 1;
}