Sign in to follow this  
coldacid

[XNA] How do I determine the plaform on which I run?

Recommended Posts

Quote:
Original post by coldacid
So with XNA, how do I tell if I'm running on Windows or on the Xbox? There doesn't seem to be any information about this in the XNA documentation.

As of now, I'm not sure that there is (or if there is going to be one in the future). They seem to be keeping a pretty tight leash on doing platform-specific stuff. However, who knows how that could change, as all of that is still being developed.

Is there a way to do it based on the build configuration or something? In C++ you would just make a #define - I'm not what the alternate to that is in C# though.

Share this post


Link to post
Share on other sites
Try posting this question on the official XNA forums, I know Mitch, Dave, and several others have been great at answering questions like these. Makes you wonder if they ever actually get any work done on the framework.

Share this post


Link to post
Share on other sites
From what I understand, you have to compile a different binary for each system anyways, so you can just put in your own conditional compilation flag.

http://msdn2.microsoft.com/en-us/library/yt3yck0x.aspx

And I think there's a way of making different build configurations automatically define things for you. I've never done that myself, but I seem to recall seeing it somewhere.

Share this post


Link to post
Share on other sites
It seems that is possible to run the same binary on every XNA platform.

A good indication to know the platform you run should be the supported shader profile. Only the XBox have they special Shader Mode 3 variant.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this