Cocos2d full screen mode button

Hello! I have a question about the full-screen mode of the program - games on cocos2d-x 4.0 c++ Visual Studio 16 2019. When you start the program, there are 3 buttons at the top near the title (program name): minimize, close, full-screen mode. But basically this button is locked and does not work. How can I make it work? Maybe there are some options or methods, using code?

Hello,
To make the resize button work, you can set the some parameters to your window.
There are 2 ways you can do this:

  1. Change your project source code
  2. Change the engine source code

For the first solution, in the file main.cpp, under proj.win32, add glfwWindowHint(GLFW_RESIZABLE, GL_TRUE); over AppDelegate app;, and it should work.

If you want a permanent solution, open the file CCGLViewImpl-desktop.cpp and go to the method called bool GLViewImpl::initWithRect and add glfwWindowHint(GLFW_RESIZABLE, GL_TRUE); anywhere before glfwCreateWindow and each project will have the option of scaling up.

If, when maximizing the window, some inputs are not working, you will need to edit void GLViewImpl::onGLFWframebuffersize, however I’ve never ran into problems when editing my own fork of Cocos.