mirror of https://github.com/axmolengine/axmol.git
issue #1437: fixed some compile errors.
This commit is contained in:
parent
3eecc283d0
commit
fac3e9c8de
|
@ -168,12 +168,12 @@ void CCAccelerometer::setDelegate(CCAccelerometerDelegate* pDelegate)
|
|||
if (pDelegate)
|
||||
{
|
||||
// Register our handler
|
||||
CCEGLView::sharedOpenGLView().setAccelerometerKeyHook( &myAccelerometerKeyHook );
|
||||
CCEGLView::sharedOpenGLView()->setAccelerometerKeyHook( &myAccelerometerKeyHook );
|
||||
}
|
||||
else
|
||||
{
|
||||
// De-register our handler
|
||||
CCEGLView::sharedOpenGLView().setAccelerometerKeyHook( NULL );
|
||||
CCEGLView::sharedOpenGLView()->setAccelerometerKeyHook( NULL );
|
||||
resetAccelerometer();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -99,10 +99,10 @@ void CCApplication::setAnimationInterval(double interval)
|
|||
//////////////////////////////////////////////////////////////////////////
|
||||
// static member function
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
CCApplication& CCApplication::sharedApplication()
|
||||
CCApplication* CCApplication::sharedApplication()
|
||||
{
|
||||
CC_ASSERT(sm_pSharedApplication);
|
||||
return *sm_pSharedApplication;
|
||||
return sm_pSharedApplication;
|
||||
}
|
||||
|
||||
ccLanguageType CCApplication::getCurrentLanguage()
|
||||
|
|
|
@ -24,7 +24,7 @@ public:
|
|||
@brief Get current applicaiton instance.
|
||||
@return Current application instance pointer.
|
||||
*/
|
||||
static CCApplication& sharedApplication();
|
||||
static CCApplication* sharedApplication();
|
||||
|
||||
/* override functions */
|
||||
virtual void setAnimationInterval(double interval);
|
||||
|
|
|
@ -248,10 +248,10 @@ LRESULT CCEGLView::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
|
|||
switch (wParam)
|
||||
{
|
||||
case SIZE_RESTORED:
|
||||
CCApplication::sharedApplication().applicationWillEnterForeground();
|
||||
CCApplication::sharedApplication()->applicationWillEnterForeground();
|
||||
break;
|
||||
case SIZE_MINIMIZED:
|
||||
CCApplication::sharedApplication().applicationDidEnterBackground();
|
||||
CCApplication::sharedApplication()->applicationDidEnterBackground();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -14,7 +14,7 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
|
|||
|
||||
// create the application instance
|
||||
AppDelegate app;
|
||||
CCEGLView& eglView = CCEGLView::sharedOpenGLView();
|
||||
eglView.setFrameSize(960, 640 );
|
||||
return CCApplication::sharedApplication().run();
|
||||
CCEGLView* eglView = CCEGLView::sharedOpenGLView();
|
||||
eglView->setFrameSize(960, 640 );
|
||||
return CCApplication::sharedApplication()->run();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue