打包Windows 如何全屏。。。 不要窗口 之前的回答已经过期了 。。。

如题 打包Windows 如何全屏。。。 不要窗口 之前的回答已经过期了 。。。

修改CCGLView-desktop.cpp文件可以实现
最近也在研究这个问题
具体做法是cocos creator构建以后
使用VS打开,在
CCGLView-desktop.cpp
中的GLView构建函数中可以找到这一行
_mainWindow = glfwCreateWindow(width, height, name.c_str(), _monitor, nullptr);

将其中的_monitor改为glfwGetPrimaryMonitor()

如下
_mainWindow = glfwCreateWindow(width, height, name.c_str(), glfwGetPrimaryMonitor(), nullptr);

即可实现全屏
在GLFW的官方文档里面给出了很多相关的使用方法,可以参考
https://www.glfw.org/docs/latest/window_guide.html#window_creation

5赞

正解,多谢