Skip to content


Browse files Browse the repository at this point in the history
Fall back to default when rendering mode (3d_mode) is set invalid (#1…
  • Loading branch information
srifqi committed Feb 6, 2021
1 parent fbb9ef3 commit 3ac07ad
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/client/render/factory.cpp
Expand Up @@ -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"
Expand All @@ -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);

0 comments on commit 3ac07ad

Please sign in to comment.