From cc7135a0f496087f74c57b382ea56ffcb83c0eb1 Mon Sep 17 00:00:00 2001 From: lisyarus Date: Tue, 28 Feb 2023 01:36:17 +0300 Subject: [PATCH] Warn about unknown pixel format instead of throwing --- libs/gfx/source/pixel.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/gfx/source/pixel.cpp b/libs/gfx/source/pixel.cpp index 24f8c195..39d01206 100644 --- a/libs/gfx/source/pixel.cpp +++ b/libs/gfx/source/pixel.cpp @@ -1,6 +1,8 @@ #include #include +#include + namespace psemek::gfx { @@ -70,7 +72,8 @@ namespace psemek::gfx case gl::COMPRESSED_SIGNED_RED_RGTC1: return 1; }; - throw std::runtime_error(util::to_string("unknown pixel format: 0x", std::hex, internal_format)); + log::warning() << "Unknown pixel format: 0x" << std::hex << internal_format; + return 0; } }