diff --git a/examples/boing.c b/examples/boing.c index c6f225fbf..d517860d3 100644 --- a/examples/boing.c +++ b/examples/boing.c @@ -255,6 +255,18 @@ void key_callback( GLFWwindow* window, int key, int scancode, int action, int mo { if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS) glfwSetWindowShouldClose(window, GL_TRUE); + + if (key == GLFW_KEY_ENTER && mods == GLFW_MOD_ALT && action == GLFW_PRESS) + { + if (glfwGetWindowMonitor(window)) + glfwSetWindowMonitor(window, NULL, 640, 480); + else + { + GLFWmonitor* monitor = glfwGetPrimaryMonitor(); + const GLFWvidmode* mode = glfwGetVideoMode(monitor); + glfwSetWindowMonitor(window, monitor, mode->width, mode->height); + } + } } static void set_ball_pos ( GLfloat x, GLfloat y )