From 5f163547b5b8042aec6c99e2ea61f8bd706caccb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 27 Jan 2022 19:46:31 +0100 Subject: [PATCH] al-info,gl-info: you fool, printing extension strings all on one line. Very useless behavior. I always suffered a lot when looking at the output of --extension-strings. For no reason! It didn't have to be like that! --- src/Magnum/Audio/al-info.cpp | 6 ++++-- src/Magnum/Platform/gl-info.cpp | 8 ++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/Magnum/Audio/al-info.cpp b/src/Magnum/Audio/al-info.cpp index b4a463689..d109a3c84 100644 --- a/src/Magnum/Audio/al-info.cpp +++ b/src/Magnum/Audio/al-info.cpp @@ -125,8 +125,10 @@ int main(const int argc, const char** const argv) { Debug() << "Current device:" << c.deviceSpecifierString(); if(args.isSet("extension-strings")) { - Debug() << "Extension strings:" << Debug::newline - << c.extensionStrings(); + Debug() << "Extension strings:"; + /* Because printing all extensions on a single line isn't helpful. */ + for(Containers::StringView e: c.extensionStrings()) + Debug{} << " " << e; return 0; } diff --git a/src/Magnum/Platform/gl-info.cpp b/src/Magnum/Platform/gl-info.cpp index 640067a3f..de65fd1e3 100644 --- a/src/Magnum/Platform/gl-info.cpp +++ b/src/Magnum/Platform/gl-info.cpp @@ -412,8 +412,12 @@ MagnumInfo::MagnumInfo(const Arguments& arguments): Platform::WindowlessApplicat Debug{} << " " << ", "_s.joinWithoutEmptyParts(c.shadingLanguageVersionStrings()); if(args.isSet("extension-strings")) { - Debug{} << "Extension strings:" << Debug::newline - << c.extensionStrings(); + Debug{} << "Extension strings:"; + /* Because printing 500+ extensions on a single line just *isn't* + helpful. For further helpfulness this assumes the driver sorted them + (Mesa does). */ + for(Containers::StringView e: c.extensionStrings()) + Debug{} << " " << e; return; }