From a61e258d8866927e775773eaa422c39a08f6aaf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 20 Aug 2019 12:47:01 +0200 Subject: [PATCH] Platform: fix {Sdl2,Glfw}Application startup on GL-less builds. --- src/Magnum/Platform/GlfwApplication.cpp | 6 +++++- src/Magnum/Platform/Sdl2Application.cpp | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Magnum/Platform/GlfwApplication.cpp b/src/Magnum/Platform/GlfwApplication.cpp index 4f4a3ff27..178064b58 100644 --- a/src/Magnum/Platform/GlfwApplication.cpp +++ b/src/Magnum/Platform/GlfwApplication.cpp @@ -67,7 +67,11 @@ GlfwApplication::GlfwApplication(const Arguments& arguments, NoCreateT): #ifdef MAGNUM_TARGET_GL _context.reset(new GLContext{NoCreate, args, arguments.argc, arguments.argv}); #else - args.parse(arguments.argc, arguments.argv); + /** @todo this is duplicated here and in Sdl2Application, figure out a nice + non-duplicated way to handle this */ + args.addOption("log", "default").setHelp("log", "console logging", "default|quiet|verbose") + .setFromEnvironment("log") + .parse(arguments.argc, arguments.argv); #endif /* Init GLFW */ diff --git a/src/Magnum/Platform/Sdl2Application.cpp b/src/Magnum/Platform/Sdl2Application.cpp index b82c1f055..34002917d 100644 --- a/src/Magnum/Platform/Sdl2Application.cpp +++ b/src/Magnum/Platform/Sdl2Application.cpp @@ -91,7 +91,11 @@ Sdl2Application::Sdl2Application(const Arguments& arguments, NoCreateT): #ifdef MAGNUM_TARGET_GL _context.reset(new GLContext{NoCreate, args, arguments.argc, arguments.argv}); #else - args.parse(arguments.argc, arguments.argv); + /** @todo this is duplicated here and in Sdl2Application, figure out a nice + non-duplicated way to handle this */ + args.addOption("log", "default").setHelp("log", "console logging", "default|quiet|verbose") + .setFromEnvironment("log") + .parse(arguments.argc, arguments.argv); #endif /* Available since 2.0.4, disables interception of SIGINT and SIGTERM so