Windows Phone 8 - how to find out device resolution?

Hi people,
I’m just starting with Windows Phone 8 development and want to try Cocos2DX for that (I’ve already dealt with cocos2d for the iPhone a few years ago…). I’ve sucessfully started and deployed that HelloWorld game that came with this download:
http://cocos2d-x.googlecode.com/files/cocos2dx-0.13.0-wp8-0.8.zip
It’s not the right resolution for my Nokia Lumia 1020, however (which has 1280 x 768), and I wanted to play a bit with the different settings for resolutions etc. in the AppDelegate::initInstance() method. How the hell can I find out the device’s resolution in the code? I have found code examples in this forums (not for WP8) that use a function “getFrameSize()” of the EGLView but the CCEGLView_win8_metro implementation doesn’t have anything like this method.

I want to create a game for Windows 8 Phones with pixel perfect graphics and want to provide dedicated graphics for the different resolutions. So how can I detect the maximum resolution of the device the code is running on?

thanks a lot for your help in advance.
Marco

Alright… Found out now that I can get “sort of” my device resolution by calling getSizeInPixel() on my CCEGLView. “Sort of” because it’s the “scaled resolution” (which is 480 x 800), not my original resolution (768 x 1280). I’ve found more info here:

See http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj206974(v=vs.105).aspx

I’m still confused how I can be sure if my device has the higher resolution of 768 x 1280 or the actual 480 x 800 when both resolutions would give me the same result when I call getSizeInPixel() on the CCEGLView. Where can I find more info anywhere how things like “designResolution”, sizes in Pixel and ContentFactors correlate? I’m completely confused :slight_smile:

thanks a ton
Marco

In the meantime I have found this thread: http://www.cocos2d-x.org/forums/6/topics/21258?r=21506#message-21506

Seems I’m not the only one having problems here and they mentioned that multiresolution support came in in 2.x and the wp8 port is still on 1.x. …

Marco