fix: log when a specified game is unsupported

This commit is contained in:
Jan 2024-08-12 09:25:19 +02:00
parent dd2c97f7a0
commit 1117339542
No known key found for this signature in database
GPG Key ID: 44B581F78FF5C57C

View File

@ -27,6 +27,7 @@
#include <deque>
#include <filesystem>
#include <format>
#include <fstream>
#include <regex>
#include <set>
@ -379,12 +380,13 @@ class LinkerImpl final : public Linker
if (!LoadGdtFilesFromZoneDefinition(context->m_gdt_files, zoneDefinition, gdtSearchPath))
return nullptr;
for (const auto* assetLoader : ZONE_CREATORS)
for (const auto* zoneCreator : ZONE_CREATORS)
{
if (assetLoader->SupportsGame(context->m_game_name))
return assetLoader->CreateZoneForDefinition(*context);
if (zoneCreator->SupportsGame(context->m_game_name))
return zoneCreator->CreateZoneForDefinition(*context);
}
std::cerr << std::format("Unsupported game: {}\n", context->m_game_name);
return nullptr;
}