mirror of https://github.com/axmolengine/axmol.git
Merge pull request #6878 from MSOpenTech/wp8-v3-fix
updated WP8 cpp template file
This commit is contained in:
commit
8a836bb49f
|
@ -24,6 +24,7 @@ using Microsoft.Phone.Shell;
|
||||||
using Windows.UI.Input;
|
using Windows.UI.Input;
|
||||||
using System.Windows.Threading;
|
using System.Windows.Threading;
|
||||||
using Microsoft.Phone.Info;
|
using Microsoft.Phone.Info;
|
||||||
|
using Windows.Graphics.Display;
|
||||||
|
|
||||||
namespace PhoneDirect3DXamlAppInterop
|
namespace PhoneDirect3DXamlAppInterop
|
||||||
{
|
{
|
||||||
|
@ -53,7 +54,30 @@ namespace PhoneDirect3DXamlAppInterop
|
||||||
{
|
{
|
||||||
if (m_d3dInterop == null)
|
if (m_d3dInterop == null)
|
||||||
{
|
{
|
||||||
m_d3dInterop = new Direct3DInterop();
|
PageOrientation pageOrientation = (PageOrientation)GetValue(OrientationProperty);
|
||||||
|
DisplayOrientations displayOrientation;
|
||||||
|
|
||||||
|
switch(pageOrientation)
|
||||||
|
{
|
||||||
|
case PageOrientation.Portrait:
|
||||||
|
case PageOrientation.PortraitUp:
|
||||||
|
displayOrientation = DisplayOrientations.Portrait;
|
||||||
|
break;
|
||||||
|
case PageOrientation.PortraitDown:
|
||||||
|
displayOrientation = DisplayOrientations.PortraitFlipped;
|
||||||
|
break;
|
||||||
|
case PageOrientation.Landscape:
|
||||||
|
case PageOrientation.LandscapeLeft:
|
||||||
|
displayOrientation = DisplayOrientations.Landscape;
|
||||||
|
break;
|
||||||
|
case PageOrientation.LandscapeRight:
|
||||||
|
displayOrientation = DisplayOrientations.LandscapeFlipped;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
displayOrientation = DisplayOrientations.Landscape;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
m_d3dInterop = new Direct3DInterop(displayOrientation);
|
||||||
|
|
||||||
// Set WindowBounds to size of DrawingSurface
|
// Set WindowBounds to size of DrawingSurface
|
||||||
m_d3dInterop.WindowBounds = new Windows.Foundation.Size(
|
m_d3dInterop.WindowBounds = new Windows.Foundation.Size(
|
||||||
|
|
Loading…
Reference in New Issue