80{
81 if (isFullscreen == fullscreen)
82 {
83 return;
84 }
85
86 static int x, y;
87 static int sx, sy;
88 isFullscreen = fullscreen;
89
90 if (fullscreen)
91 {
92
93 glfwGetWindowPos(m_Window, &x, &y);
94 glfwGetWindowSize(m_Window, &sx, &sy);
95
96 const GLFWvidmode *mode = glfwGetVideoMode(glfwGetPrimaryMonitor());
97
98 glfwSetWindowMonitor(m_Window, glfwGetPrimaryMonitor(), 0, 0, mode->width, mode->height, 0);
99 }
100
101 else
102 {
103
104 glfwSetWindowMonitor(m_Window, nullptr, x, y, sx, sy, 0);
105 }
106}