mirror of https://github.com/axmolengine/axmol.git
This commit is contained in:
parent
03cdfe1e27
commit
712da80ffb
|
@ -41,17 +41,27 @@ namespace cocos2d {
|
|||
switch (pEvent->eType)
|
||||
{
|
||||
case EVENT_AppLoad:
|
||||
if (! initCocos2d())
|
||||
{
|
||||
SendStopEvent();
|
||||
}
|
||||
bHandled = Sys_PostMessage2(MESSAGE_PRIOR_LOWEST, &m_tMsg);
|
||||
// if (! initCocos2d())
|
||||
// {
|
||||
// SendStopEvent();
|
||||
// }
|
||||
/*bHandled = Sys_PostMessage2(MESSAGE_PRIOR_LOWEST, &m_tMsg);*/
|
||||
bHandled = TRUE;
|
||||
break;
|
||||
|
||||
case EVENT_AppStopNotify:
|
||||
|
||||
break;
|
||||
|
||||
case EVENT_PenUserDrag:
|
||||
if (! initCocos2d())
|
||||
{
|
||||
SendStopEvent();
|
||||
}
|
||||
Sys_PostMessage2(MESSAGE_PRIOR_LOWEST, &m_tMsg);
|
||||
|
||||
bHandled = TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
if (! bHandled)
|
||||
|
|
|
@ -341,7 +341,21 @@ public:
|
|||
|
||||
void resizeSurface()
|
||||
{
|
||||
// do nothing on uPhone device, because of TWindow can't change size
|
||||
// if (! m_eglWnd || EGL_NO_DISPLAY == m_eglDisplay)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// // release old surface
|
||||
// if (EGL_NO_SURFACE != m_eglSurface)
|
||||
// {
|
||||
// eglDestroySurface(m_eglDisplay, m_eglSurface);
|
||||
// m_eglSurface = EGL_NO_SURFACE;
|
||||
// }
|
||||
//
|
||||
// // create new surface and make current
|
||||
// m_eglSurface = eglCreateWindowSurface(m_eglDisplay, m_eglConfig, m_eglWnd, NULL);
|
||||
// eglMakeCurrent(m_eglDisplay, m_eglSurface, m_eglSurface, m_eglContext);
|
||||
}
|
||||
|
||||
void swapBuffers()
|
||||
|
@ -404,15 +418,16 @@ Boolean CCXEGLView::EventHandler(TApplication * pApp, EventType * pEvent)
|
|||
break;
|
||||
|
||||
case EVENT_WinRotationChanged:
|
||||
{
|
||||
#ifdef _TRANZDA_VM_
|
||||
if (m_pEGL)
|
||||
{
|
||||
m_pEGL->resizeSurface();
|
||||
UpdateWindow(0);
|
||||
}
|
||||
}
|
||||
// CCX_SAFE_DELETE(m_pEGL);
|
||||
// m_pEGL = CCXEGL::create(this);
|
||||
#else // _TRANZDA_VM_
|
||||
CCX_SAFE_DELETE(m_pEGL);
|
||||
m_pEGL = CCXEGL::create(this);
|
||||
#endif // _TRANZDA_VM_
|
||||
bHandled = TRUE;
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in New Issue