From 3ac07ad34daa2e06a11f76d2fab402f411487d46 Mon Sep 17 00:00:00 2001 From: Muhammad Rifqi Priyo Susanto Date: Sat, 6 Feb 2021 19:47:12 +0700 Subject: Fall back to default when rendering mode (3d_mode) is set invalid (#10922) --- src/client/render/factory.cpp | 7 +++++-- 1 file 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 +#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); } -- cgit v1.2.3