mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-20 10:24:58 +01:00
fix(app): a renderer this build doesn't have starts the full one, not the legacy one
The starter writes "gfxrenderer vulkan" for the Vulkan renderer of the builds that have it. This exe doesn't know the word, and every word other than default/experimental fell to the legacy renderer: a player who picked Vulkan got the slowest renderer, the one whose ui crashes on NVIDIA (the arrays left by the scene). "experimental" in a build without the NVRHI renderer ended with "no renderer found!" and no game at all. After the settings are read, a gfxrenderer word this build has no renderer for becomes "default", with a line in the log saying so. The words it knows stay as they were: full/default, legacy, simple, null, the older starters' simpleshader and off (legacy as before), and experimental where it is built.
This commit is contained in:
@@ -29,6 +29,11 @@ std::unique_ptr<gfx_renderer> gfx_renderer_factory::create(const std::string &ba
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool gfx_renderer_factory::has_backend(const std::string &name) const
|
||||
{
|
||||
return backends.contains(name);
|
||||
}
|
||||
|
||||
gfx_renderer_factory *gfx_renderer_factory::get_instance()
|
||||
{
|
||||
if (!instance)
|
||||
|
||||
@@ -151,6 +151,7 @@ public:
|
||||
|
||||
bool register_backend(const std::string &backend, create_method func);
|
||||
std::unique_ptr<gfx_renderer> create(const std::string &name);
|
||||
bool has_backend(const std::string &name) const;
|
||||
|
||||
static gfx_renderer_factory* get_instance();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user