mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Consistent title bar + render information in mainmenu (#10764)
This commit is contained in:
parent
f345d00a43
commit
f4118a4fde
5 changed files with 28 additions and 14 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue