Fox9
May 7, 2014, 5:51pm
1
If I use the 1080p emulators(5.5 inch and 6 inch) in Visual Studio 2013 to test my Windows Phone game, then GraphicsDevice.Viewport has the following values:
GraphicsDevice.Viewport.Width = 1279 pixel
GraphicsDevice.Viewport.Height = 720 pixel
Why is GraphicsDevice.Viewport not 1920 pixel wide and 1080 pixel tall? 1080p should be 1920x1080 and not 1279x720.
Is that a MonoGame bug or why does GraphicsDevice.Viewport has the wrong values?
Random thing I found on google:
http://monogame.codeplex.com/discussions/495196
Possibly related discussion:
I am having an issue with the Nokia 1520 where the positions of the touch events, do not match the proper coordinates on the screen. I’m using a Windows Phone 8.1 project.
For example, I tap on the bottom-right of the screen. Debugging in XamlGame, in the OnPointerPressed method, I can see that the incoming pointerPoint is {818,455}. The LogicalDpi is reported as 144, so the point gets converted to {1227,682}. The problem is though that the screen resolution is actually 1920x1080.
This does…
And this sort of suggests it works :-/
http://developer.nokia.com/community/wiki/UI_Framework_for_XNA_and_MonoGame_with_high_DPI_support
Nezz
May 8, 2014, 1:43pm
3
1080p is sadly just a scaled up 720p. See:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj206974(v=vs.105).aspx
Even detecting it is hard (you can use DeviceExtendedProperties AFAIK):
“On a 1080p resolution screen, the ScaleFactor property will return 1.5, although a 2.25x scale is used internally by the OS.”