diff options
author | Muhammad Rifqi Priyo Susanto <muhammadrifqipriyosusanto@gmail.com> | 2021-02-06 19:47:12 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-06 13:47:12 +0100 |
commit | 3ac07ad34daa2e06a11f76d2fab402f411487d46 (patch) | |
tree | afb45fb3db88ba973a7c5846fe97dc7422ab3d18 /src | |
parent | fbb9ef3818b17894843f967c0c23b5d57a1e3771 (diff) | |
download | minetest-3ac07ad34daa2e06a11f76d2fab402f411487d46.tar.gz minetest-3ac07ad34daa2e06a11f76d2fab402f411487d46.tar.bz2 minetest-3ac07ad34daa2e06a11f76d2fab402f411487d46.zip |
Fall back to default when rendering mode (3d_mode) is set invalid (#10922)
Diffstat (limited to 'src')
-rw-r--r-- | src/client/render/factory.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/client/render/factory.cpp b/src/client/render/factory.cpp index 30f9480fc..7fcec40dd 100644 --- a/src/client/render/factory.cpp +++ b/src/client/render/factory.cpp @@ -19,7 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc., */ #include "factory.h" -#include <stdexcept> +#include "log.h" #include "plain.h" #include "anaglyph.h" #include "interlaced.h" @@ -45,5 +45,8 @@ RenderingCore *createRenderingCore(const std::string &stereo_mode, IrrlichtDevic return new RenderingCoreSideBySide(device, client, hud, true); if (stereo_mode == "crossview") return new RenderingCoreSideBySide(device, client, hud, false, true); - throw std::invalid_argument("Invalid rendering mode: " + stereo_mode); + + // fallback to plain renderer + errorstream << "Invalid rendering mode: " << stereo_mode << std::endl; + return new RenderingCorePlain(device, client, hud); } |