Hello there I’m currently attempting to create a resolution settings menu for a game and everything works so far, I can successfully change resolution and have no problems whatsoever. BUT I use mouse control in my game and my max screen resolution is 1366x768 when I change the resolution to one with higher width/height than it can actually take however… I have this “problem”: Whelp the game draws the highest possible max resolution on my screen for example:
1920x1020 becomes 1366x768 since 1366<1920 and 768<1020
1152x864 becomes 1152x768 since 1366>1152 and 768<864
/-------------\ ======== 1920 x1020
| 1366 x. .|, ,||
| 768 …|,||
\ ------------/ ,||
This mainly causes 2 problems:
- Simply awkward resolutions 1152x768, wut?
- As I tried to show above: the 1366x768 is my computer screen and I try to draw a 1920x1020 resolution on it, it draws everything on the 1366*768 but the “mouse region can’t reach anything outside” that 1366x768 upper left box because of the way I currently “upscale” the mouseposition to get a standard mouseposition in every screenresolution (sorry if this sounds difficult/elaborate but it works very good on lower resolutions and ofcourse your best resolution) this causes the mouse input not to match with the actually game input. How do I know this? Well I tried my application on my friends computer with a 1920x1020 resolution and didn’t encounter any problems every resolution worked fine on it…
Now I actually do know how to fix this, I just don’t know if there pre-existing fields/methods that can make my life alot easier: - Is there a way that I can ask the maximum resolution of a screen (like in my case 1366x768) through the XNA (or monogame) framework? This is not “GraphicsDevice.preferredBackBufferWidth/Height” because that gives me my “virtual screen” resolution…
- If not, is there any other way to prevent users from setting a higher resolution than they actually can?
But everything works fine if the user chooses a resolution that his screen can handle…
Phew I hope you get the current problem I’m having a little bit…
PS: I still haven’t gotten
to work I just can’t get fullscreen for some reason I’m still using maximum screen resolution + borderless windows to work around this…
Thanks a lot.