Skip to content

Commit

Permalink
Remove unused l_get_video_drivers in ModApiMainMenu
Browse files Browse the repository at this point in the history
  • Loading branch information
grorp committed Jan 1, 2025
1 parent f088eed commit 7f0bcf3
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 29 deletions.
5 changes: 0 additions & 5 deletions doc/menu_lua_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,6 @@ of manually putting one, as different OSs use different delimiters. E.g.
* `spec` = `SimpleSoundSpec` (see `lua_api.md`)
* `looped` = bool
* `handle:stop()` or `core.sound_stop(handle)`
* `core.get_video_drivers()`
* get list of video drivers supported by engine (not all modes are guaranteed to work)
* returns list of available video drivers' settings name and 'friendly' display name
e.g. `{ {name="opengl", friendly_name="OpenGL"}, {name="software", friendly_name="Software Renderer"} }`
* first element of returned list is guaranteed to be the NULL driver
* `core.get_mapgen_names([include_hidden=false])` -> table of map generator algorithms
registered in the core (possible in async calls)
* `core.get_cache_path()` -> path of cache
Expand Down
22 changes: 0 additions & 22 deletions src/script/lua_api/l_mainmenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -875,27 +875,6 @@ int ModApiMainMenu::l_download_file(lua_State *L)
return 1;
}

/******************************************************************************/
int ModApiMainMenu::l_get_video_drivers(lua_State *L)
{
auto drivers = RenderingEngine::getSupportedVideoDrivers();

lua_newtable(L);
for (u32 i = 0; i != drivers.size(); i++) {
auto &info = RenderingEngine::getVideoDriverInfo(drivers[i]);

lua_newtable(L);
lua_pushstring(L, info.name.c_str());
lua_setfield(L, -2, "name");
lua_pushstring(L, info.friendly_name.c_str());
lua_setfield(L, -2, "friendly_name");

lua_rawseti(L, -2, i + 1);
}

return 1;
}

/******************************************************************************/
int ModApiMainMenu::l_get_min_supp_proto(lua_State *L)
{
Expand Down Expand Up @@ -1029,7 +1008,6 @@ void ModApiMainMenu::Initialize(lua_State *L, int top)
API_FCT(get_mainmenu_path);
API_FCT(show_path_select_dialog);
API_FCT(download_file);
API_FCT(get_video_drivers);
API_FCT(get_min_supp_proto);
API_FCT(get_max_supp_proto);
API_FCT(get_formspec_version);
Expand Down
2 changes: 0 additions & 2 deletions src/script/lua_api/l_mainmenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,6 @@ class ModApiMainMenu: public ModApiBase

static int l_download_file(lua_State *L);

static int l_get_video_drivers(lua_State *L);

//version compatibility
static int l_get_min_supp_proto(lua_State *L);

Expand Down

0 comments on commit 7f0bcf3

Please sign in to comment.