From a7db186d069a4e2eac059a2e1b86bc20a1e23dd7 Mon Sep 17 00:00:00 2001 From: natural-law Date: Thu, 12 May 2011 10:11:58 +0800 Subject: [PATCH] Modify the test code for the right device orientation. --- tests/tests/controller.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/tests/controller.cpp b/tests/tests/controller.cpp index fc2dc89a02..fc77df0aa1 100644 --- a/tests/tests/controller.cpp +++ b/tests/tests/controller.cpp @@ -19,9 +19,6 @@ static TestScene* CreateTestScene(int nIdx) { CCDirector::sharedDirector()->purgeCachedData(); - // change to default orientation - ChangeOrientation(CCDeviceOrientationPortrait); - TestScene* pScene = NULL; switch (nIdx) @@ -49,7 +46,7 @@ static TestScene* CreateTestScene(int nIdx) case TEST_COCOSNODE: pScene = new CocosNodeTestScene(); break; case TEST_TOUCHES: - ChangeOrientation(CCDeviceOrientationLandscapeLeft); + ChangeOrientation(CCDeviceOrientationLandscapeRight); pScene = new PongScene(); break; case TEST_MENU: pScene = new MenuTestScene(); break; @@ -123,6 +120,9 @@ static TestScene* CreateTestScene(int nIdx) TestController::TestController() : m_tBeginPos(CCPointZero) { + // change to default orientation + ChangeOrientation(CCDeviceOrientationPortrait); + // add close menu CCMenuItemImage *pCloseItem = CCMenuItemImage::itemFromNormalImage(s_pPathClose, s_pPathClose, this, menu_selector(TestController::closeCallback) ); CCMenu* pMenu =CCMenu::menuWithItems(pCloseItem, NULL);