forked from Mirrorlandia_minetest/minetest
Drop --videomodes, fullscreen_bpp and high_precision_fpu settings
These have been pointless for a while.
This commit is contained in:
parent
dc165fe942
commit
edf098db63
@ -660,10 +660,10 @@ viewing_range (Viewing range) int 190 20 4000
|
|||||||
# 0.1 = Default, 0.25 = Good value for weaker tablets.
|
# 0.1 = Default, 0.25 = Good value for weaker tablets.
|
||||||
near_plane (Near plane) float 0.1 0 0.25
|
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
|
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
|
screen_h (Screen height) int 600 1
|
||||||
|
|
||||||
# Save window size automatically when modified.
|
# Save window size automatically when modified.
|
||||||
@ -672,9 +672,6 @@ autosave_screensize (Autosave screen size) bool true
|
|||||||
# Fullscreen mode.
|
# Fullscreen mode.
|
||||||
fullscreen (Full screen) bool false
|
fullscreen (Full screen) bool false
|
||||||
|
|
||||||
# Bits per pixel (aka color depth) in fullscreen mode.
|
|
||||||
fullscreen_bpp (Full screen BPP) int 24
|
|
||||||
|
|
||||||
# Vertical screen synchronization.
|
# Vertical screen synchronization.
|
||||||
vsync (VSync) bool false
|
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.
|
# 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
|
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.
|
# Replaces the default main menu with a custom one.
|
||||||
main_menu_script (Main menu script) string
|
main_menu_script (Main menu script) string
|
||||||
|
|
||||||
|
@ -99,10 +99,6 @@ bool ClientLauncher::run(GameStartData &start_data, const Settings &cmd_args)
|
|||||||
|
|
||||||
init_args(start_data, 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 USE_SOUND
|
||||||
if (g_settings->getBool("enable_sound"))
|
if (g_settings->getBool("enable_sound"))
|
||||||
g_sound_manager_singleton = createSoundManagerSingleton();
|
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"))
|
if (cmd_args.exists("name"))
|
||||||
start_data.name = cmd_args.get("name");
|
start_data.name = cmd_args.get("name");
|
||||||
|
|
||||||
list_video_modes = cmd_args.getFlag("videomodes");
|
|
||||||
|
|
||||||
random_input = g_settings->getBool("random_input")
|
random_input = g_settings->getBool("random_input")
|
||||||
|| cmd_args.getFlag("random-input");
|
|| cmd_args.getFlag("random-input");
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,6 @@ private:
|
|||||||
|
|
||||||
void speed_tests();
|
void speed_tests();
|
||||||
|
|
||||||
bool list_video_modes = false;
|
|
||||||
bool skip_main_menu = false;
|
bool skip_main_menu = false;
|
||||||
bool random_input = false;
|
bool random_input = false;
|
||||||
RenderingEngine *m_rendering_engine = nullptr;
|
RenderingEngine *m_rendering_engine = nullptr;
|
||||||
|
@ -92,7 +92,6 @@ RenderingEngine::RenderingEngine(IEventReceiver *receiver)
|
|||||||
|
|
||||||
// bpp, fsaa, vsync
|
// bpp, fsaa, vsync
|
||||||
bool vsync = g_settings->getBool("vsync");
|
bool vsync = g_settings->getBool("vsync");
|
||||||
u16 bits = g_settings->getU16("fullscreen_bpp");
|
|
||||||
u16 fsaa = g_settings->getU16("fsaa");
|
u16 fsaa = g_settings->getU16("fsaa");
|
||||||
|
|
||||||
// stereo buffer required for pageflip stereo
|
// stereo buffer required for pageflip stereo
|
||||||
@ -122,15 +121,13 @@ RenderingEngine::RenderingEngine(IEventReceiver *receiver)
|
|||||||
params.LoggingLevel = irr::ELL_DEBUG;
|
params.LoggingLevel = irr::ELL_DEBUG;
|
||||||
params.DriverType = driverType;
|
params.DriverType = driverType;
|
||||||
params.WindowSize = core::dimension2d<u32>(screen_w, screen_h);
|
params.WindowSize = core::dimension2d<u32>(screen_w, screen_h);
|
||||||
params.Bits = bits;
|
|
||||||
params.AntiAlias = fsaa;
|
params.AntiAlias = fsaa;
|
||||||
params.Fullscreen = fullscreen;
|
params.Fullscreen = fullscreen;
|
||||||
params.Stencilbuffer = false;
|
params.Stencilbuffer = false;
|
||||||
params.Stereobuffer = stereo_buffer;
|
params.Stereobuffer = stereo_buffer;
|
||||||
params.Vsync = vsync;
|
params.Vsync = vsync;
|
||||||
params.EventReceiver = receiver;
|
params.EventReceiver = receiver;
|
||||||
params.HighPrecisionFPU = g_settings->getBool("high_precision_fpu");
|
params.HighPrecisionFPU = true;
|
||||||
params.ZBufferBits = 24;
|
|
||||||
#ifdef __ANDROID__
|
#ifdef __ANDROID__
|
||||||
params.PrivateData = porting::app_global;
|
params.PrivateData = porting::app_global;
|
||||||
#endif
|
#endif
|
||||||
@ -171,60 +168,6 @@ void RenderingEngine::setResizable(bool resize)
|
|||||||
m_device->setResizable(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)
|
void RenderingEngine::removeMesh(const scene::IMesh* mesh)
|
||||||
{
|
{
|
||||||
m_device->getSceneManager()->getMeshCache()->removeMesh(mesh);
|
m_device->getSceneManager()->getMeshCache()->removeMesh(mesh);
|
||||||
@ -582,25 +525,6 @@ void RenderingEngine::draw_menu_scene(gui::IGUIEnvironment *guienv,
|
|||||||
get_video_driver()->endScene();
|
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> RenderingEngine::getSupportedVideoDrivers()
|
||||||
{
|
{
|
||||||
std::vector<irr::video::E_DRIVER_TYPE> drivers;
|
std::vector<irr::video::E_DRIVER_TYPE> drivers;
|
||||||
|
@ -124,7 +124,6 @@ public:
|
|||||||
return s_singleton->core->get_shadow_renderer();
|
return s_singleton->core->get_shadow_renderer();
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
static std::vector<core::vector3d<u32>> getSupportedVideoModes();
|
|
||||||
static std::vector<irr::video::E_DRIVER_TYPE> getSupportedVideoDrivers();
|
static std::vector<irr::video::E_DRIVER_TYPE> getSupportedVideoDrivers();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -177,7 +177,6 @@ void set_default_settings()
|
|||||||
settings->setDefault("screen_h", "600");
|
settings->setDefault("screen_h", "600");
|
||||||
settings->setDefault("autosave_screensize", "true");
|
settings->setDefault("autosave_screensize", "true");
|
||||||
settings->setDefault("fullscreen", "false");
|
settings->setDefault("fullscreen", "false");
|
||||||
settings->setDefault("fullscreen_bpp", "24");
|
|
||||||
settings->setDefault("vsync", "false");
|
settings->setDefault("vsync", "false");
|
||||||
settings->setDefault("fov", "72");
|
settings->setDefault("fov", "72");
|
||||||
settings->setDefault("leaves_style", "fancy");
|
settings->setDefault("leaves_style", "fancy");
|
||||||
@ -454,7 +453,6 @@ void set_default_settings()
|
|||||||
settings->setDefault("server_name", "");
|
settings->setDefault("server_name", "");
|
||||||
settings->setDefault("server_description", "");
|
settings->setDefault("server_description", "");
|
||||||
|
|
||||||
settings->setDefault("high_precision_fpu", "true");
|
|
||||||
settings->setDefault("enable_console", "false");
|
settings->setDefault("enable_console", "false");
|
||||||
settings->setDefault("screen_dpi", "72");
|
settings->setDefault("screen_dpi", "72");
|
||||||
|
|
||||||
|
@ -304,8 +304,6 @@ static void set_allowed_options(OptionList *allowed_options)
|
|||||||
allowed_options->insert(std::make_pair("terminal", ValueSpec(VALUETYPE_FLAG,
|
allowed_options->insert(std::make_pair("terminal", ValueSpec(VALUETYPE_FLAG,
|
||||||
_("Feature an interactive terminal (Only works when using minetestserver or with --server)"))));
|
_("Feature an interactive terminal (Only works when using minetestserver or with --server)"))));
|
||||||
#ifndef 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,
|
allowed_options->insert(std::make_pair("speedtests", ValueSpec(VALUETYPE_FLAG,
|
||||||
_("Run speed tests"))));
|
_("Run speed tests"))));
|
||||||
allowed_options->insert(std::make_pair("address", ValueSpec(VALUETYPE_STRING,
|
allowed_options->insert(std::make_pair("address", ValueSpec(VALUETYPE_STRING,
|
||||||
|
@ -752,28 +752,6 @@ int ModApiMainMenu::l_get_video_drivers(lua_State *L)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************/
|
|
||||||
int ModApiMainMenu::l_get_video_modes(lua_State *L)
|
|
||||||
{
|
|
||||||
std::vector<core::vector3d<u32> > 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)
|
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(download_file);
|
||||||
API_FCT(gettext);
|
API_FCT(gettext);
|
||||||
API_FCT(get_video_drivers);
|
API_FCT(get_video_drivers);
|
||||||
API_FCT(get_video_modes);
|
|
||||||
API_FCT(get_screen_info);
|
API_FCT(get_screen_info);
|
||||||
API_FCT(get_min_supp_proto);
|
API_FCT(get_min_supp_proto);
|
||||||
API_FCT(get_max_supp_proto);
|
API_FCT(get_max_supp_proto);
|
||||||
|
@ -140,8 +140,6 @@ private:
|
|||||||
|
|
||||||
static int l_get_video_drivers(lua_State *L);
|
static int l_get_video_drivers(lua_State *L);
|
||||||
|
|
||||||
static int l_get_video_modes(lua_State *L);
|
|
||||||
|
|
||||||
//version compatibility
|
//version compatibility
|
||||||
static int l_get_min_supp_proto(lua_State *L);
|
static int l_get_min_supp_proto(lua_State *L);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user