diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index ae421de2c..57857cabb 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -660,10 +660,10 @@ viewing_range (Viewing range) int 190 20 4000 # 0.1 = Default, 0.25 = Good value for weaker tablets. near_plane (Near plane) float 0.1 0 0.25 -# Width component of the initial window size. +# Width component of the initial window size. Ignored in fullscreen mode. screen_w (Screen width) int 1024 1 -# Height component of the initial window size. +# Height component of the initial window size. Ignored in fullscreen mode. screen_h (Screen height) int 600 1 # Save window size automatically when modified. @@ -672,9 +672,6 @@ autosave_screensize (Autosave screen size) bool true # Fullscreen mode. fullscreen (Full screen) bool false -# Bits per pixel (aka color depth) in fullscreen mode. -fullscreen_bpp (Full screen BPP) int 24 - # Vertical screen synchronization. vsync (VSync) bool false @@ -1477,9 +1474,6 @@ curl_parallel_limit (cURL parallel limit) int 8 # Maximum time a file download (e.g. a mod download) may take, stated in milliseconds. curl_file_download_timeout (cURL file download timeout) int 300000 -# Makes DirectX work with LuaJIT. Disable if it causes troubles. -high_precision_fpu (High-precision FPU) bool true - # Replaces the default main menu with a custom one. main_menu_script (Main menu script) string diff --git a/src/client/clientlauncher.cpp b/src/client/clientlauncher.cpp index dbf1d1cd1..13e7aefcf 100644 --- a/src/client/clientlauncher.cpp +++ b/src/client/clientlauncher.cpp @@ -99,10 +99,6 @@ bool ClientLauncher::run(GameStartData &start_data, const Settings &cmd_args) init_args(start_data, cmd_args); - // List video modes if requested - if (list_video_modes) - return m_rendering_engine->print_video_modes(); - #if USE_SOUND if (g_settings->getBool("enable_sound")) g_sound_manager_singleton = createSoundManagerSingleton(); @@ -336,8 +332,6 @@ void ClientLauncher::init_args(GameStartData &start_data, const Settings &cmd_ar if (cmd_args.exists("name")) start_data.name = cmd_args.get("name"); - list_video_modes = cmd_args.getFlag("videomodes"); - random_input = g_settings->getBool("random_input") || cmd_args.getFlag("random-input"); } diff --git a/src/client/clientlauncher.h b/src/client/clientlauncher.h index 79727e1fe..d1fd9a258 100644 --- a/src/client/clientlauncher.h +++ b/src/client/clientlauncher.h @@ -46,7 +46,6 @@ private: void speed_tests(); - bool list_video_modes = false; bool skip_main_menu = false; bool random_input = false; RenderingEngine *m_rendering_engine = nullptr; diff --git a/src/client/renderingengine.cpp b/src/client/renderingengine.cpp index 4f96a6e37..9015fb82a 100644 --- a/src/client/renderingengine.cpp +++ b/src/client/renderingengine.cpp @@ -92,7 +92,6 @@ RenderingEngine::RenderingEngine(IEventReceiver *receiver) // bpp, fsaa, vsync bool vsync = g_settings->getBool("vsync"); - u16 bits = g_settings->getU16("fullscreen_bpp"); u16 fsaa = g_settings->getU16("fsaa"); // stereo buffer required for pageflip stereo @@ -122,15 +121,13 @@ RenderingEngine::RenderingEngine(IEventReceiver *receiver) params.LoggingLevel = irr::ELL_DEBUG; params.DriverType = driverType; params.WindowSize = core::dimension2d(screen_w, screen_h); - params.Bits = bits; params.AntiAlias = fsaa; params.Fullscreen = fullscreen; params.Stencilbuffer = false; params.Stereobuffer = stereo_buffer; params.Vsync = vsync; params.EventReceiver = receiver; - params.HighPrecisionFPU = g_settings->getBool("high_precision_fpu"); - params.ZBufferBits = 24; + params.HighPrecisionFPU = true; #ifdef __ANDROID__ params.PrivateData = porting::app_global; #endif @@ -171,60 +168,6 @@ void RenderingEngine::setResizable(bool resize) m_device->setResizable(resize); } -bool RenderingEngine::print_video_modes() -{ - IrrlichtDevice *nulldevice; - - bool vsync = g_settings->getBool("vsync"); - u16 fsaa = g_settings->getU16("fsaa"); - MyEventReceiver *receiver = new MyEventReceiver(); - - SIrrlichtCreationParameters params = SIrrlichtCreationParameters(); - params.DriverType = video::EDT_NULL; - params.WindowSize = core::dimension2d(640, 480); - params.Bits = 24; - params.AntiAlias = fsaa; - params.Fullscreen = false; - params.Stencilbuffer = false; - params.Vsync = vsync; - params.EventReceiver = receiver; - params.HighPrecisionFPU = g_settings->getBool("high_precision_fpu"); - - nulldevice = createDeviceEx(params); - - if (!nulldevice) { - delete receiver; - return false; - } - - std::cout << _("Available video modes (WxHxD):") << std::endl; - - video::IVideoModeList *videomode_list = nulldevice->getVideoModeList(); - - if (videomode_list != NULL) { - s32 videomode_count = videomode_list->getVideoModeCount(); - core::dimension2d videomode_res; - s32 videomode_depth; - for (s32 i = 0; i < videomode_count; ++i) { - videomode_res = videomode_list->getVideoModeResolution(i); - videomode_depth = videomode_list->getVideoModeDepth(i); - std::cout << videomode_res.Width << "x" << videomode_res.Height - << "x" << videomode_depth << std::endl; - } - - std::cout << _("Active video mode (WxHxD):") << std::endl; - videomode_res = videomode_list->getDesktopResolution(); - videomode_depth = videomode_list->getDesktopDepth(); - std::cout << videomode_res.Width << "x" << videomode_res.Height << "x" - << videomode_depth << std::endl; - } - - nulldevice->drop(); - delete receiver; - - return videomode_list != NULL; -} - void RenderingEngine::removeMesh(const scene::IMesh* mesh) { m_device->getSceneManager()->getMeshCache()->removeMesh(mesh); @@ -582,25 +525,6 @@ void RenderingEngine::draw_menu_scene(gui::IGUIEnvironment *guienv, get_video_driver()->endScene(); } -std::vector> RenderingEngine::getSupportedVideoModes() -{ - IrrlichtDevice *nulldevice = createDevice(video::EDT_NULL); - sanity_check(nulldevice); - - std::vector> mlist; - video::IVideoModeList *modelist = nulldevice->getVideoModeList(); - - s32 num_modes = modelist->getVideoModeCount(); - for (s32 i = 0; i != num_modes; i++) { - core::dimension2d mode_res = modelist->getVideoModeResolution(i); - u32 mode_depth = (u32)modelist->getVideoModeDepth(i); - mlist.emplace_back(mode_res.Width, mode_res.Height, mode_depth); - } - - nulldevice->drop(); - return mlist; -} - std::vector RenderingEngine::getSupportedVideoDrivers() { std::vector drivers; diff --git a/src/client/renderingengine.h b/src/client/renderingengine.h index 6d42221d6..5299222e2 100644 --- a/src/client/renderingengine.h +++ b/src/client/renderingengine.h @@ -124,7 +124,6 @@ public: return s_singleton->core->get_shadow_renderer(); return nullptr; } - static std::vector> getSupportedVideoModes(); static std::vector getSupportedVideoDrivers(); private: diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index 38cade80b..0895bf898 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -177,7 +177,6 @@ void set_default_settings() settings->setDefault("screen_h", "600"); settings->setDefault("autosave_screensize", "true"); settings->setDefault("fullscreen", "false"); - settings->setDefault("fullscreen_bpp", "24"); settings->setDefault("vsync", "false"); settings->setDefault("fov", "72"); settings->setDefault("leaves_style", "fancy"); @@ -454,7 +453,6 @@ void set_default_settings() settings->setDefault("server_name", ""); settings->setDefault("server_description", ""); - settings->setDefault("high_precision_fpu", "true"); settings->setDefault("enable_console", "false"); settings->setDefault("screen_dpi", "72"); diff --git a/src/main.cpp b/src/main.cpp index 7f96836b5..4a69f83b5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -304,8 +304,6 @@ static void set_allowed_options(OptionList *allowed_options) allowed_options->insert(std::make_pair("terminal", ValueSpec(VALUETYPE_FLAG, _("Feature an interactive terminal (Only works when using minetestserver or with --server)")))); #ifndef SERVER - allowed_options->insert(std::make_pair("videomodes", ValueSpec(VALUETYPE_FLAG, - _("Show available video modes")))); allowed_options->insert(std::make_pair("speedtests", ValueSpec(VALUETYPE_FLAG, _("Run speed tests")))); allowed_options->insert(std::make_pair("address", ValueSpec(VALUETYPE_STRING, diff --git a/src/script/lua_api/l_mainmenu.cpp b/src/script/lua_api/l_mainmenu.cpp index ee3e72dea..788557460 100644 --- a/src/script/lua_api/l_mainmenu.cpp +++ b/src/script/lua_api/l_mainmenu.cpp @@ -752,28 +752,6 @@ int ModApiMainMenu::l_get_video_drivers(lua_State *L) return 1; } -/******************************************************************************/ -int ModApiMainMenu::l_get_video_modes(lua_State *L) -{ - std::vector > videomodes - = RenderingEngine::getSupportedVideoModes(); - - lua_newtable(L); - for (u32 i = 0; i != videomodes.size(); i++) { - lua_newtable(L); - lua_pushnumber(L, videomodes[i].X); - lua_setfield(L, -2, "w"); - lua_pushnumber(L, videomodes[i].Y); - lua_setfield(L, -2, "h"); - lua_pushnumber(L, videomodes[i].Z); - lua_setfield(L, -2, "depth"); - - lua_rawseti(L, -2, i + 1); - } - - return 1; -} - /******************************************************************************/ int ModApiMainMenu::l_gettext(lua_State *L) { @@ -895,7 +873,6 @@ void ModApiMainMenu::Initialize(lua_State *L, int top) API_FCT(download_file); API_FCT(gettext); API_FCT(get_video_drivers); - API_FCT(get_video_modes); API_FCT(get_screen_info); API_FCT(get_min_supp_proto); API_FCT(get_max_supp_proto); diff --git a/src/script/lua_api/l_mainmenu.h b/src/script/lua_api/l_mainmenu.h index 33ac9e721..ec2d20da2 100644 --- a/src/script/lua_api/l_mainmenu.h +++ b/src/script/lua_api/l_mainmenu.h @@ -140,8 +140,6 @@ private: static int l_get_video_drivers(lua_State *L); - static int l_get_video_modes(lua_State *L); - //version compatibility static int l_get_min_supp_proto(lua_State *L);