Snake case for screen options in minetest.conf (#5792)
authorVincent Glize <vincentglize@hotmail.fr>
Sat, 3 Jun 2017 20:02:07 +0000 (22:02 +0200)
committerLoïc Blot <nerzhul@users.noreply.github.com>
Sat, 3 Jun 2017 20:02:07 +0000 (22:02 +0200)
src/client/clientlauncher.cpp
src/defaultsettings.cpp
src/game.cpp
src/guiEngine.cpp

index 289d1537b11d44f9cce13e49e0cda3ab1678fe15..3e8fa2f2ff8ce086942cf003afd6d7964f097ab9 100644 (file)
@@ -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<u32>(screenW, screenH);
+       params.WindowSize    = core::dimension2d<u32>(screen_w, screen_h);
        params.Bits          = bits;
        params.AntiAlias     = fsaa;
        params.Fullscreen    = fullscreen;
index 0a44069fd79621eb4f15f9f764053494e6ef3f12..e9fb5ea6b415a9d6d5a241df43dce8f3c20d181e 100644 (file)
@@ -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");
index ff473e022922541b32164cc744184855a0cef39b..765744b75b8e9dd0dfa6e2fde12e52315ff0c90d 100644 (file)
@@ -1633,8 +1633,8 @@ void Game::run()
                        && client->checkPrivilege("fast");
 #endif
 
-       irr::core::dimension2d<u32> previous_screen_size(g_settings->getU16("screenW"),
-               g_settings->getU16("screenH"));
+       irr::core::dimension2d<u32> 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<u32>(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;
                }
 
index 2d1bd6d44acbdd4bca6cb9671dd518d099f7d441..545187bfc0ee9f513cde20348afbacc89bc2cb49 100644 (file)
@@ -262,8 +262,8 @@ void GUIEngine::run()
 
        unsigned int text_height = g_fontengine->getTextHeight();
 
-       irr::core::dimension2d<u32> previous_screen_size(g_settings->getU16("screenW"),
-               g_settings->getU16("screenH"));
+       irr::core::dimension2d<u32> 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<u32>(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;
                }