We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3ef5f26 commit 64cb3d0Copy full SHA for 64cb3d0
src/windowManager.cpp
@@ -12,12 +12,15 @@
12
#include "Renderable.h"
13
#include "collisionable.h"
14
#include "postProcessManager.h"
15
+#include "io/keybinding.h"
16
17
#include <glm/gtc/type_ptr.hpp>
18
#include <cmath>
19
#include <SDL.h>
20
#include <stdlib.h>
21
22
+sp::io::Keybinding fullscreen_key{"FULLSCREEN"};
23
+
24
static string getFromEnvironment(const char* key, string default_value) {
25
auto value = getenv(key);
26
if (!value)
@@ -61,6 +64,9 @@ Window::~Window()
61
64
62
65
void Window::render()
63
66
{
67
+ if (fullscreen_key.getDown())
68
+ setMode(getMode() == Mode::Window ? Mode::Fullscreen : Mode::Window);
69
70
SDL_GL_MakeCurrent(static_cast<SDL_Window*>(window), gl_context);
71
72
int w, h;
0 commit comments