D:\MyCocosLua316\AddSubEqual\frameworks\cocos2d-x\cocos\platform\desktop\CCGLViewImpl-desktop.cpp
函数
bool GLViewImpl::initWithRect(const std::string& viewName, Rect rect, float frameZoomFactor, bool resizable)
/*
* Note that the created window and context may differ from what you requested,
* as not all parameters and hints are
* [hard constraints](@ref window_hints_hard). This includes the size of the
* window, especially for full screen windows. To retrieve the actual
* attributes of the created window and context, use queries like @ref
* glfwGetWindowAttrib and @ref glfwGetWindowSize.
*
* see declaration glfwCreateWindow
*/
int realW = 0, realH = 0;
glfwGetWindowSize(_mainWindow, &realW, &realH);
//这里引起了windows 竖屏窗口大小不正确的bug 暂时屏蔽还不知道会有什么后遗症
/*
if (realW != neededWidth)
{
rect.size.width = realW / _frameZoomFactor;
}
if (realH != neededHeight)
{
rect.size.height = realH / _frameZoomFactor;
}
*/
glfwMakeContextCurrent(_mainWindow);
补充小计一下
这个问题改了N久 过了段时间 自己都忘了
如果是PC的话 改1920*1080分辨率 记得把缩放调成0.5