Noob: How Would I Trap This DX Error?

BlitzMax Forums/BlitzMax Beginners Area/Noob: How Would I Trap This DX Error?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I'm glad I bought this new widescreen monitor, otherwise I never would have realized the bug. So now what I'm doing is building 2 arrays of graphics modes that my game can run best in. One for widesreen and one for standard. The arrays are constructed in order of best case to worse case.
Global widescreenmodes:Int[] = [1280, 800, 1440, 900, 1280, 768, 1280, 720]
Global standardmodes:Int[] = [1024, 768, 800, 600,640,480]

Depending on desktop aspect ratio, the program loops through the suitable array checking to see If GraphicsModeExists(), the first one it finds a match with, it uses it.

If no matches found, it defaults to the desktop res. But at least this way, I can hopefully find a better suited res for the game depending on my games resolution and aspect ratio. The key thing is to make sure you build the arrays with enough realistic info on resolutions past, present and future.

But since my games are wide screen to begin with, I hopefully wouldn't run into the situation that some games have, where the game res is 800x600 and it ends up being stretched on wide screen monitor. eek...