cocos2d-x for wp8 设置横竖屏

在主project文件(xxx.cpp , xxx为你的项目名)中,

函数名为void xxx::SetWindow(CoreWindow^ window)

相关代码片例如以下:

<pre name="code" class="cpp">void ImpasseForLife::SetWindow(CoreWindow^ window)
{
    // Specify the orientation of your application here
    // The choices are DisplayOrientations::Portrait or DisplayOrientations::Landscape or DisplayOrientations::LandscapeFlipped
	DisplayProperties::AutoRotationPreferences = DisplayOrientations::Portrait;    
    //...
}

当中改动
DisplayOrientations::
之后的即可了,默认是Landscape,为横屏,Portrait是竖屏,第三个应该是横屏的还有一个方向


原文地址:https://www.cnblogs.com/blfshiye/p/4078386.html