Click here to Skip to main content
15,040,003 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
So I have a game that I made 1-2 months ago.At that time when I placed my mouse at the bottom-right corner of the screen and checked the mouse's X and Y positions,it showed 1360 and 760(so my full screen size was 1360*760).Now I recently updated to Windows 8.But now When I place my mouse in the bottom right corner and check its position again its 1280*720.I even used GraphicsDevice.Viewport.Width/Height to check the size of the full screen but its the same(1280*720).
However,I can change the size of the game screen using
C#
graphics.PreferredBackBufferWidth = 1360;
           graphics.PreferredBackBufferHeight = 760;

but then I get a windowed screen.I want the full screen of my computer(which is 1280*720 right now) to be 1360*760 again.How do I do that?
Please help me!!There MUST be a way...
Posted
Updated 26-Dec-14 1:32am
v2

1 solution

No, there must not be a way, sorry. Not every possible mode must be available. That actually is determined by your graphics card drivers and monitor drivers. After moving on to Win 8, the old graphics mode was not available anymore and you now get the closest mode fitting to your requests.

Under DirectX you can enumerate all available fullscreen modes. I can't look it up right now, but there should be some way to do the same in XNA.

Then again, why do you need to know the exact screen resolution anyway? Hardcoded fixed values will never work very well. Why don't you get such information from the currently used mode? Then it will always be correct, no matter what computer your game is running on.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900