diff --git a/cocos/platform/desktop/CCGLViewImpl-desktop.cpp b/cocos/platform/desktop/CCGLViewImpl-desktop.cpp index cc9fbc3bf6..a5a4a63be5 100644 --- a/cocos/platform/desktop/CCGLViewImpl-desktop.cpp +++ b/cocos/platform/desktop/CCGLViewImpl-desktop.cpp @@ -682,7 +682,6 @@ void GLViewImpl::setFullscreen(GLFWmonitor *monitor, int w, int h, int refreshRa _monitor = monitor; const GLFWvidmode* videoMode = glfwGetVideoMode(_monitor); - if (w == -1) w = videoMode->width; if (h == -1)