forked from Mirrorlandia_minetest/minetest
Fall back to default when rendering mode (3d_mode) is set invalid (#10922)
This commit is contained in:
parent
fbb9ef3818
commit
3ac07ad34d
@ -19,7 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "factory.h"
|
#include "factory.h"
|
||||||
#include <stdexcept>
|
#include "log.h"
|
||||||
#include "plain.h"
|
#include "plain.h"
|
||||||
#include "anaglyph.h"
|
#include "anaglyph.h"
|
||||||
#include "interlaced.h"
|
#include "interlaced.h"
|
||||||
@ -45,5 +45,8 @@ RenderingCore *createRenderingCore(const std::string &stereo_mode, IrrlichtDevic
|
|||||||
return new RenderingCoreSideBySide(device, client, hud, true);
|
return new RenderingCoreSideBySide(device, client, hud, true);
|
||||||
if (stereo_mode == "crossview")
|
if (stereo_mode == "crossview")
|
||||||
return new RenderingCoreSideBySide(device, client, hud, false, true);
|
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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user