From 111733954270c46090cc750d1678a5ab853103f5 Mon Sep 17 00:00:00 2001 From: Jan Date: Mon, 12 Aug 2024 09:25:19 +0200 Subject: [PATCH] fix: log when a specified game is unsupported --- src/Linker/Linker.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Linker/Linker.cpp b/src/Linker/Linker.cpp index ea9cd2cc..9209a8df 100644 --- a/src/Linker/Linker.cpp +++ b/src/Linker/Linker.cpp @@ -27,6 +27,7 @@ #include #include +#include #include #include #include @@ -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; }