diff options
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/clientlauncher.cpp | 6 | ||||
-rw-r--r-- | src/client/clientlauncher.h | 1 | ||||
-rw-r--r-- | src/client/renderingengine.cpp | 78 | ||||
-rw-r--r-- | src/client/renderingengine.h | 1 |
4 files changed, 1 insertions, 85 deletions
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<u32>(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<u32>(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<u32> 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<core::vector3d<u32>> RenderingEngine::getSupportedVideoModes() -{ - IrrlichtDevice *nulldevice = createDevice(video::EDT_NULL); - sanity_check(nulldevice); - - std::vector<core::vector3d<u32>> mlist; - video::IVideoModeList *modelist = nulldevice->getVideoModeList(); - - s32 num_modes = modelist->getVideoModeCount(); - for (s32 i = 0; i != num_modes; i++) { - core::dimension2d<u32> 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<irr::video::E_DRIVER_TYPE> RenderingEngine::getSupportedVideoDrivers() { std::vector<irr::video::E_DRIVER_TYPE> 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<core::vector3d<u32>> getSupportedVideoModes(); static std::vector<irr::video::E_DRIVER_TYPE> getSupportedVideoDrivers(); private: |