Changing Screen Resolutions

Started by KK20, June 04, 2013, 02:34:16 am

Previous topic - Next topic

KK20

June 04, 2013, 02:34:16 am Last Edit: June 04, 2013, 02:46:22 am by KK20
Looking into ForeverZer0's Custom Resolution script, it came to my attention that putting the game into fullscreen will cause some errors (as it has been pointed out a few times in the thread itself). I have recently started looking at Win32API to see if there were any particular solutions to this problem. The first idea I had was to loop through EnumDisplaySettings and see if the user supports the resolution configured in the script. If so, upon pressing Alt + Enter (alias through Input.update), the function ChangeDisplaySettings would be called. But doing this interrupts RMXP's fullscreen or something...the screen freezes, but it still takes input (after pressing the arrow keys and switching back to window mode, my character was at a different location). Perhaps I'm not using the correct settings, I need to experiment more I guess. Do you know why?

Another idea I had was not to change the resolution at all, but either stretch the window or draw a black border around the game ('Center Image' and 'Maintain Aspect Ratio' I presume), but I haven't played with that yet. I could also make it so that Alt + Enter is disabled and just make fullscreen be called with, say, F5 instead.

Just curious for any ideas, suggestions, feedback, or knowledge on this whole subject.

EDIT: Also, what is it that causes windows to change the resolution when it's active, but minimizing said window reverts to the original screen resolution?

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!