Skip to content

Commit 3ac07ad

Browse files
authoredFeb 6, 2021
Fall back to default when rendering mode (3d_mode) is set invalid (#10922)
1 parent fbb9ef3 commit 3ac07ad

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed
 

‎src/client/render/factory.cpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
1919
*/
2020

2121
#include "factory.h"
22-
#include <stdexcept>
22+
#include "log.h"
2323
#include "plain.h"
2424
#include "anaglyph.h"
2525
#include "interlaced.h"
@@ -45,5 +45,8 @@ RenderingCore *createRenderingCore(const std::string &stereo_mode, IrrlichtDevic
4545
return new RenderingCoreSideBySide(device, client, hud, true);
4646
if (stereo_mode == "crossview")
4747
return new RenderingCoreSideBySide(device, client, hud, false, true);
48-
throw std::invalid_argument("Invalid rendering mode: " + stereo_mode);
48+
49+
// fallback to plain renderer
50+
errorstream << "Invalid rendering mode: " << stereo_mode << std::endl;
51+
return new RenderingCorePlain(device, client, hud);
4952
}

0 commit comments

Comments
 (0)
Please sign in to comment.