slightly odd: porting from monogame WP8 to XNA WP7

I’ve had a few requests for a WP7 version of my game. Now I normally wouldn’t bother as the market is fairly small, but if it no big effort, why not :slight_smile: share the love and all that.

So I’ll give it a go later but I presume if i just create a new XNA WP7 project and then drop in my game code and resources it should just build and go?

Luckily my game is V.simple - Penku (live on wp8 / android)
so all the code is in 2 files. game.cs and one other class.

so it should just work right? as it already handles any screen res - and wp7 res is a valid wp8 one anyway - will give a go later today.

I reverse-engineered a game from Monogame to XNA pretty easily - took about an hour. Only issue I had was that the compact .Net framework does not allow you to enumerate enums by Enum.GetValues(typeof([your_enum])) - but there are ways round this.

yep got it up and running in no time - and with proper content pipeline :smile:

all I had to do was add in a reference to

BUT i’m getting a weird screen resolution problem

its saying the screen is 480x480
when i check
vheight = GraphicsDevice.Viewport.Height;
vwidth = GraphicsDevice.Viewport.Width;

I’m getting correct size back from

vwidth = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width;
vheight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height;

but the port is still a square in the middle of the screen

ok fixed it :smile:
just had to add

        graphics.PreferredBackBufferWidth =480;
        graphics.PreferredBackBufferHeight = 800;

Whoops! Yeah, I hit that problem too, I’d completely forgotten about it until you brought it up!