From 63702188be4f7fbd90af05edfef87f8de9ea66b3 Mon Sep 17 00:00:00 2001 From: James Chen Date: Tue, 26 Nov 2013 15:56:43 +0800 Subject: [PATCH] issue #3258: Compilation error fix for linux port. --- cocos/2d/platform/linux/CCEGLView.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos/2d/platform/linux/CCEGLView.cpp b/cocos/2d/platform/linux/CCEGLView.cpp index 612f936d51..d8fbbf5737 100644 --- a/cocos/2d/platform/linux/CCEGLView.cpp +++ b/cocos/2d/platform/linux/CCEGLView.cpp @@ -290,7 +290,7 @@ EGLView::EGLView() { CCASSERT(nullptr == s_pEglView, "EGLView is singleton, Should be inited only one time\n"); s_pEglView = this; - strcpy(_viewName, "Cocos2dxWin32"); + _viewName = "Cocos2dxWin32"; glfwSetErrorCallback(EGLViewEventHandler::OnGLFWError); glfwInit(); } @@ -310,7 +310,7 @@ bool EGLView::init(const char* viewName, float width, float height, float frameZ setFrameZoomFactor(frameZoomFactor); glfwWindowHint(GLFW_RESIZABLE,GL_FALSE); - _mainWindow = glfwCreateWindow(_screenSize.width * _frameZoomFactor, _screenSize.height * _frameZoomFactor, _viewName, nullptr, nullptr); + _mainWindow = glfwCreateWindow(_screenSize.width * _frameZoomFactor, _screenSize.height * _frameZoomFactor, _viewName.c_str(), nullptr, nullptr); glfwMakeContextCurrent(_mainWindow); glfwGetFramebufferSize(_mainWindow, &_frameBufferSize[0], &_frameBufferSize[1]);