diff --git a/test_uphone/tests/controller.cpp b/test_uphone/tests/controller.cpp index 94afc4f57e..d224436434 100644 --- a/test_uphone/tests/controller.cpp +++ b/test_uphone/tests/controller.cpp @@ -5,12 +5,6 @@ #define LINE_SPACE 40 static int s_nPageIndex = 0; -static cocos2d::ccDeviceOrientation s_eDefaultOrientation = kCCDeviceOrientationLandscapeLeft; - -void TestController::setDefaultDeviceOrientation(cocos2d::ccDeviceOrientation eOrientation) -{ - s_eDefaultOrientation = eOrientation; -} static TestScene* CreateTestScene(int nIdx) { @@ -41,7 +35,7 @@ static TestScene* CreateTestScene(int nIdx) case TEST_COCOSNODE: pScene = new CocosNodeTestScene(); break; case TEST_TOUCHES: - CCDirector::getSharedDirector()->setDeviceOrientation(kCCDeviceOrientationPortrait); + CCDirector::getSharedDirector()->setDeviceOrientation(CCDeviceOrientationPortrait); pScene = new PongScene(); break; case TEST_MENU: pScene = new MenuTestScene(); break; @@ -58,7 +52,7 @@ static TestScene* CreateTestScene(int nIdx) case TEST_INTERVAL: pScene = new IntervalTestScene(); break; case TEST_CHIPMUNK: - CCDirector::getSharedDirector()->setDeviceOrientation(kCCDeviceOrientationPortrait); + CCDirector::getSharedDirector()->setDeviceOrientation(CCDeviceOrientationPortrait); pScene = new ChipmunkTestScene(); break; case TEST_ATLAS: pScene = new AtlasTestScene(); break; @@ -85,7 +79,7 @@ static TestScene* CreateTestScene(int nIdx) TestController::TestController() { - CCDirector::getSharedDirector()->setDeviceOrientation(s_eDefaultOrientation); + CCDirector::getSharedDirector()->setDeviceOrientation(CCDeviceOrientationLandscapeLeft); // add close menu CCMenuItemImage *pCloseItem = CCMenuItemImage::itemFromNormalImage(s_pPathClose, s_pPathClose, this, menu_selector(TestController::closeCallback) ); diff --git a/test_uphone/tests/controller.h b/test_uphone/tests/controller.h index f2de5238b3..9a0d50da6e 100644 --- a/test_uphone/tests/controller.h +++ b/test_uphone/tests/controller.h @@ -21,11 +21,10 @@ public: void updateItemsText(); - static void setDefaultDeviceOrientation(cocos2d::ccDeviceOrientation eOrientation); - private: - CCMenuItemLabel * m_pMenuItems[ITEM_EVERYPAGE]; - unsigned int m_nUIDs[ITEM_EVERYPAGE]; + CCMenuItemLabel * m_pMenuItems[ITEM_EVERYPAGE]; + + unsigned int m_nUIDs[ITEM_EVERYPAGE]; }; #endif