mirror of https://github.com/axmolengine/axmol.git
Merge pull request #1299 from moadib/handle_window_close_on_linux
Handle window close on linux
This commit is contained in:
commit
951d5b4e59
|
@ -142,6 +142,11 @@ void mousePosEventHandle(int iPosX,int iPosY) {
|
|||
}
|
||||
}
|
||||
|
||||
int closeEventHandle() {
|
||||
CCDirector::sharedDirector()->end();
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
void CCEGLView::setFrameSize(float width, float height)
|
||||
{
|
||||
bool eResult = false;
|
||||
|
@ -217,6 +222,8 @@ void CCEGLView::setFrameSize(float width, float height)
|
|||
//register the glfw mouse pos event
|
||||
glfwSetMousePosCallback(mousePosEventHandle);
|
||||
|
||||
glfwSetWindowCloseCallback(closeEventHandle);
|
||||
|
||||
//Inits extensions
|
||||
eResult = initExtensions();
|
||||
|
||||
|
|
Loading…
Reference in New Issue