Windows phone multiple resolution

Windows phone multiple resolution
0.0 0


As I known, Windows phone got 3 type of resolution like 480 × 800, 768 × 1280 and 720 × 1280.
Do anyone know how to detect the device resolution and set the correct resolution base on the device.
For instance in iOS, detect the iPhone normal and retina resolution.

Thank you.


i have the same trouble to you,so i want to know if you find a way to solve it?


Cocos2d-x for Windows phone version 2 preview has a Sub or method to detect the resolution but this is the preview version that can’t be use for developing game.
The Cocos2d-x for Windows phone version 1 (stable version) don’t have this Sub or method. I set the resolution to 480 × 800 for my game.


looking at
I use this way that can help me to solve this problem.

Changing the design resolution breaks the coordinate transformation for touches

To Fix:

In CCEGLView_win8_metro.cpp replace all these lines:

pTouch~~>SetTouchInfo / m_fScreenScaleFactor / m_fWinScaleX,
/ m_fScreenScaleFactor / m_fWinScaleY);
With this one:
float touchScale = min;
pTouch~~>SetTouchInfo((point.x - m_rcViewPort.left) / touchScale / m_fWinScaleX,
(point.y/touchScale - / m_fWinScaleY);
DISCLAIMER: This solution - while working - is a hack, because right now i am too lazy to try and understand how this actually works. Use at your own discretion

from Sören Busch