Browse Source

Platform: test initial window size params in GLFW and SDL2 apps.

pull/300/head
Vladimír Vondruš 7 years ago
parent
commit
562cf677ff
  1. 4
      src/Magnum/Platform/Test/GlfwApplicationTest.cpp
  2. 4
      src/Magnum/Platform/Test/Sdl2ApplicationTest.cpp

4
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 {

4
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";

Loading…
Cancel
Save