diff --git a/src/windowManager.cpp b/src/windowManager.cpp index e4f878f6..2196c3ff 100644 --- a/src/windowManager.cpp +++ b/src/windowManager.cpp @@ -12,12 +12,15 @@ #include "Renderable.h" #include "collisionable.h" #include "postProcessManager.h" +#include "io/keybinding.h" #include #include #include #include +sp::io::Keybinding fullscreen_key{"FULLSCREEN"}; + static string getFromEnvironment(const char* key, string default_value) { auto value = getenv(key); if (!value) @@ -61,6 +64,9 @@ Window::~Window() void Window::render() { + if (fullscreen_key.getDown()) + setMode(getMode() == Mode::Window ? Mode::Fullscreen : Mode::Window); + SDL_GL_MakeCurrent(static_cast(window), gl_context); int w, h;