cocos2d-Lua

cocos2d-x 3.16 Lua win32版本标题改分辨率

2019-05-20  本文已影响0人  人气小哥

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);
上一篇 下一篇

猜你喜欢

热点阅读