美文网首页
cocos2d-x 3.16 Lua win32版本标题改分辨率

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

作者: 小云锅 | 来源:发表于2019-07-30 12:18 被阅读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);

作者:人气小哥

链接:https://www.jianshu.com/p/adbf0fc8b7a4

来源:简书

简书著作权归作者所有,任何形式的转载都请联系作者获得授权并注明出处。

相关文章

网友评论

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

      本文链接:https://www.haomeiwen.com/subject/xwwgrctx.html