From dd0a058e1fc74f37605022b52fa1f6b04086bbbf Mon Sep 17 00:00:00 2001 From: Vincent Glize Date: Sat, 3 Jun 2017 22:02:07 +0200 Subject: [PATCH] Snake case for screen options in minetest.conf (#5792) --- src/client/clientlauncher.cpp | 6 +++--- src/defaultsettings.cpp | 8 ++++---- src/game.cpp | 8 ++++---- src/guiEngine.cpp | 8 ++++---- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/client/clientlauncher.cpp b/src/client/clientlauncher.cpp index 289d1537b..3e8fa2f2f 100644 --- a/src/client/clientlauncher.cpp +++ b/src/client/clientlauncher.cpp @@ -522,8 +522,8 @@ bool ClientLauncher::create_engine_device() { // Resolution selection bool fullscreen = g_settings->getBool("fullscreen"); - u16 screenW = g_settings->getU16("screenW"); - u16 screenH = g_settings->getU16("screenH"); + u16 screen_w = g_settings->getU16("screen_w"); + u16 screen_h = g_settings->getU16("screen_h"); // bpp, fsaa, vsync bool vsync = g_settings->getBool("vsync"); @@ -553,7 +553,7 @@ bool ClientLauncher::create_engine_device() SIrrlichtCreationParameters params = SIrrlichtCreationParameters(); params.DriverType = driverType; - params.WindowSize = core::dimension2d(screenW, screenH); + params.WindowSize = core::dimension2d(screen_w, screen_h); params.Bits = bits; params.AntiAlias = fsaa; params.Fullscreen = fullscreen; diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index 0a44069fd..e9fb5ea6b 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -125,8 +125,8 @@ void set_default_settings(Settings *settings) settings->setDefault("fps_max", "60"); settings->setDefault("pause_fps_max", "20"); settings->setDefault("viewing_range", "100"); - settings->setDefault("screenW", "800"); - settings->setDefault("screenH", "600"); + settings->setDefault("screen_w", "800"); + settings->setDefault("screen_h", "600"); settings->setDefault("autosave_screensize", "true"); settings->setDefault("fullscreen", "false"); settings->setDefault("fullscreen_bpp", "24"); @@ -360,8 +360,8 @@ void set_default_settings(Settings *settings) settings->setDefault("enable_console", "false"); #ifdef __ANDROID__ - settings->setDefault("screenW", "0"); - settings->setDefault("screenH", "0"); + settings->setDefault("screen_w", "0"); + settings->setDefault("screen_h", "0"); settings->setDefault("enable_shaders", "false"); settings->setDefault("fullscreen", "true"); settings->setDefault("video_driver", "ogles1"); diff --git a/src/game.cpp b/src/game.cpp index ff473e022..765744b75 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1633,8 +1633,8 @@ void Game::run() && client->checkPrivilege("fast"); #endif - irr::core::dimension2d previous_screen_size(g_settings->getU16("screenW"), - g_settings->getU16("screenH")); + irr::core::dimension2d previous_screen_size(g_settings->getU16("screen_w"), + g_settings->getU16("screen_h")); while (device->run() && !(*kill || g_gamecallback->shutdown_requested @@ -1648,8 +1648,8 @@ void Game::run() if (previous_screen_size != current_screen_size && current_screen_size != irr::core::dimension2d(0,0) && g_settings->getBool("autosave_screensize")) { - g_settings->setU16("screenW", current_screen_size.Width); - g_settings->setU16("screenH", current_screen_size.Height); + g_settings->setU16("screen_w", current_screen_size.Width); + g_settings->setU16("screen_h", current_screen_size.Height); previous_screen_size = current_screen_size; } diff --git a/src/guiEngine.cpp b/src/guiEngine.cpp index 2d1bd6d44..545187bfc 100644 --- a/src/guiEngine.cpp +++ b/src/guiEngine.cpp @@ -262,8 +262,8 @@ void GUIEngine::run() unsigned int text_height = g_fontengine->getTextHeight(); - irr::core::dimension2d previous_screen_size(g_settings->getU16("screenW"), - g_settings->getU16("screenH")); + irr::core::dimension2d previous_screen_size(g_settings->getU16("screen_w"), + g_settings->getU16("screen_h")); while (m_device->run() && (!m_startgame) && (!m_kill)) { @@ -275,8 +275,8 @@ void GUIEngine::run() if (previous_screen_size != current_screen_size && current_screen_size != irr::core::dimension2d(0,0) && g_settings->getBool("autosave_screensize")) { - g_settings->setU16("screenW", current_screen_size.Width); - g_settings->setU16("screenH", current_screen_size.Height); + g_settings->setU16("screen_w", current_screen_size.Width); + g_settings->setU16("screen_h", current_screen_size.Height); previous_screen_size = current_screen_size; } -- 2.25.1