Snake case for screen options in minetest.conf (#5792)

master
Vincent Glize 2017-06-03 22:02:07 +02:00 committed by Loïc Blot
parent 63ca71e9d2
commit dd0a058e1f
4 changed files with 15 additions and 15 deletions

View File

@ -522,8 +522,8 @@ bool ClientLauncher::create_engine_device()
{ {
// Resolution selection // Resolution selection
bool fullscreen = g_settings->getBool("fullscreen"); bool fullscreen = g_settings->getBool("fullscreen");
u16 screenW = g_settings->getU16("screenW"); u16 screen_w = g_settings->getU16("screen_w");
u16 screenH = g_settings->getU16("screenH"); u16 screen_h = g_settings->getU16("screen_h");
// bpp, fsaa, vsync // bpp, fsaa, vsync
bool vsync = g_settings->getBool("vsync"); bool vsync = g_settings->getBool("vsync");
@ -553,7 +553,7 @@ bool ClientLauncher::create_engine_device()
SIrrlichtCreationParameters params = SIrrlichtCreationParameters(); SIrrlichtCreationParameters params = SIrrlichtCreationParameters();
params.DriverType = driverType; params.DriverType = driverType;
params.WindowSize = core::dimension2d<u32>(screenW, screenH); params.WindowSize = core::dimension2d<u32>(screen_w, screen_h);
params.Bits = bits; params.Bits = bits;
params.AntiAlias = fsaa; params.AntiAlias = fsaa;
params.Fullscreen = fullscreen; params.Fullscreen = fullscreen;

View File

@ -125,8 +125,8 @@ void set_default_settings(Settings *settings)
settings->setDefault("fps_max", "60"); settings->setDefault("fps_max", "60");
settings->setDefault("pause_fps_max", "20"); settings->setDefault("pause_fps_max", "20");
settings->setDefault("viewing_range", "100"); settings->setDefault("viewing_range", "100");
settings->setDefault("screenW", "800"); settings->setDefault("screen_w", "800");
settings->setDefault("screenH", "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("fullscreen_bpp", "24");
@ -360,8 +360,8 @@ void set_default_settings(Settings *settings)
settings->setDefault("enable_console", "false"); settings->setDefault("enable_console", "false");
#ifdef __ANDROID__ #ifdef __ANDROID__
settings->setDefault("screenW", "0"); settings->setDefault("screen_w", "0");
settings->setDefault("screenH", "0"); settings->setDefault("screen_h", "0");
settings->setDefault("enable_shaders", "false"); settings->setDefault("enable_shaders", "false");
settings->setDefault("fullscreen", "true"); settings->setDefault("fullscreen", "true");
settings->setDefault("video_driver", "ogles1"); settings->setDefault("video_driver", "ogles1");

View File

@ -1633,8 +1633,8 @@ void Game::run()
&& client->checkPrivilege("fast"); && client->checkPrivilege("fast");
#endif #endif
irr::core::dimension2d<u32> previous_screen_size(g_settings->getU16("screenW"), irr::core::dimension2d<u32> previous_screen_size(g_settings->getU16("screen_w"),
g_settings->getU16("screenH")); g_settings->getU16("screen_h"));
while (device->run() while (device->run()
&& !(*kill || g_gamecallback->shutdown_requested && !(*kill || g_gamecallback->shutdown_requested
@ -1648,8 +1648,8 @@ void Game::run()
if (previous_screen_size != current_screen_size && if (previous_screen_size != current_screen_size &&
current_screen_size != irr::core::dimension2d<u32>(0,0) && current_screen_size != irr::core::dimension2d<u32>(0,0) &&
g_settings->getBool("autosave_screensize")) { g_settings->getBool("autosave_screensize")) {
g_settings->setU16("screenW", current_screen_size.Width); g_settings->setU16("screen_w", current_screen_size.Width);
g_settings->setU16("screenH", current_screen_size.Height); g_settings->setU16("screen_h", current_screen_size.Height);
previous_screen_size = current_screen_size; previous_screen_size = current_screen_size;
} }

View File

@ -262,8 +262,8 @@ void GUIEngine::run()
unsigned int text_height = g_fontengine->getTextHeight(); unsigned int text_height = g_fontengine->getTextHeight();
irr::core::dimension2d<u32> previous_screen_size(g_settings->getU16("screenW"), irr::core::dimension2d<u32> previous_screen_size(g_settings->getU16("screen_w"),
g_settings->getU16("screenH")); g_settings->getU16("screen_h"));
while (m_device->run() && (!m_startgame) && (!m_kill)) { while (m_device->run() && (!m_startgame) && (!m_kill)) {
@ -275,8 +275,8 @@ void GUIEngine::run()
if (previous_screen_size != current_screen_size && if (previous_screen_size != current_screen_size &&
current_screen_size != irr::core::dimension2d<u32>(0,0) && current_screen_size != irr::core::dimension2d<u32>(0,0) &&
g_settings->getBool("autosave_screensize")) { g_settings->getBool("autosave_screensize")) {
g_settings->setU16("screenW", current_screen_size.Width); g_settings->setU16("screen_w", current_screen_size.Width);
g_settings->setU16("screenH", current_screen_size.Height); g_settings->setU16("screen_h", current_screen_size.Height);
previous_screen_size = current_screen_size; previous_screen_size = current_screen_size;
} }