From 562cf677ff4d00c54824413052aeb81cf998a450 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 26 May 2019 22:02:00 +0200 Subject: [PATCH] Platform: test initial window size params in GLFW and SDL2 apps. --- src/Magnum/Platform/Test/GlfwApplicationTest.cpp | 4 +++- src/Magnum/Platform/Test/Sdl2ApplicationTest.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Magnum/Platform/Test/GlfwApplicationTest.cpp b/src/Magnum/Platform/Test/GlfwApplicationTest.cpp index 714bfb6a1..65df79aa0 100644 --- a/src/Magnum/Platform/Test/GlfwApplicationTest.cpp +++ b/src/Magnum/Platform/Test/GlfwApplicationTest.cpp @@ -30,7 +30,9 @@ namespace Magnum { namespace Platform { namespace Test { namespace { struct GlfwApplicationTest: Platform::Application { - explicit GlfwApplicationTest(const Arguments& arguments): Platform::Application{arguments} {} + explicit GlfwApplicationTest(const Arguments& arguments): Platform::Application{arguments} { + Debug{} << "window size" << windowSize() << framebufferSize() << dpiScaling(); + } /* For testing HiDPI resize events */ void viewportEvent(ViewportEvent& event) override { diff --git a/src/Magnum/Platform/Test/Sdl2ApplicationTest.cpp b/src/Magnum/Platform/Test/Sdl2ApplicationTest.cpp index b796ad605..b457ebf32 100644 --- a/src/Magnum/Platform/Test/Sdl2ApplicationTest.cpp +++ b/src/Magnum/Platform/Test/Sdl2ApplicationTest.cpp @@ -33,7 +33,9 @@ namespace Magnum { namespace Platform { namespace Test { namespace { struct Sdl2ApplicationTest: Platform::Application { /* For testing resize events */ - explicit Sdl2ApplicationTest(const Arguments& arguments): Platform::Application{arguments, Configuration{}.setWindowFlags(Configuration::WindowFlag::Resizable)} {} + explicit Sdl2ApplicationTest(const Arguments& arguments): Platform::Application{arguments, Configuration{}.setWindowFlags(Configuration::WindowFlag::Resizable)} { + Debug{} << "window size" << windowSize() << framebufferSize() << dpiScaling(); + } void exitEvent(ExitEvent& event) override { Debug{} << "application exiting";