issue #1437: fixed some compile errors.

This commit is contained in:
James Chen 2012-08-21 17:25:03 +08:00
parent 3eecc283d0
commit fac3e9c8de
5 changed files with 10 additions and 10 deletions

View File

@ -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();
}
}

View File

@ -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()

View File

@ -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);

View File

@ -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;

View File

@ -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();
}