The suggested revisions do not work.
What my initial routine does is go through all the available modes and finds the "lowest resolution" that still fully accomidates the requested resolution.
This combined with sswift's projection matrix handling allows me to automatically setup the best full screen mode complete with proper aspect ratio and if needed auto widescreen/letterbox support.
This basically removes the need to worry about the desktop resolution and potentially running your game at the desktop res which could cause slow rendering speeds.
What my initial routine does is go through all the available modes and finds the "lowest resolution" that still fully accomidates the requested resolution.
This combined with sswift's projection matrix handling allows me to automatically setup the best full screen mode complete with proper aspect ratio and if needed auto widescreen/letterbox support.
This basically removes the need to worry about the desktop resolution and potentially running your game at the desktop res which could cause slow rendering speeds.