In many ways it is not possible to tell for sure whether the display is a stretched resolution or not. For example on the Mac with widescreen displays there are typically many normal-aspect resolutions e.g. 800x600, 1024x768 etc in the 4:3 ratio. But then there are also the same resolutions in the aspect of the display which is 16:10 or 16:9. This stretches the pixels.
Now, in the operating system, on the desktop where you choose a desktop resolution, it will tell you which mode is `stretched` and which is normal. But BlitzMax has no awareness of the difference. All Blitz can do is give you a full list of screen modes possible and you can get the dimensions and depth but it has no clue about whether it is a stretched mode, or anything to do with aspect ratios. It cannot tell the difference between 1024x768 stretched and 1024x768 normal.
So it then probably comes down to how the game is choosing which screen mode to use. The games you're seeing, BlitzMax or otherwise, are probably getting a full list of screen modes from the operating system and then going through them to find which mode matches the dimensions and depth they want. They probably do not care what the aspect ratio is or whether it is stretched. And on some systems they probably find the stretched mode before finding the non-stretched mode with the same dimensions. Voila - stretched game.
You can correct this for your own software, to some degree, by giving the user options to change the aspect ratio, which means changing the projection matrix. You could then narrow the used area of the display when it is a stretched mode, albeit having to do so manually since Max cannot tell you which modes are stretched. Possibly though once they've chosen a different aspect for the mode they choose you can store this as a default aspect to use and then next time they choose that mode it won't be stretched out. OR, you can also make use of widescreen modes by utilizing a combination of the correct proportion-preserving aspect ratio and making extra use of the available screen width.
But then of course you get into problems such as how to dynamically size the graphics, how to stretch your heads-up-display, how to deal with GUI stretching, how the game can be fair when a user with a widescreen sees more of the play area, etc.
Now, in the operating system, on the desktop where you choose a desktop resolution, it will tell you which mode is `stretched` and which is normal. But BlitzMax has no awareness of the difference. All Blitz can do is give you a full list of screen modes possible and you can get the dimensions and depth but it has no clue about whether it is a stretched mode, or anything to do with aspect ratios. It cannot tell the difference between 1024x768 stretched and 1024x768 normal.
So it then probably comes down to how the game is choosing which screen mode to use. The games you're seeing, BlitzMax or otherwise, are probably getting a full list of screen modes from the operating system and then going through them to find which mode matches the dimensions and depth they want. They probably do not care what the aspect ratio is or whether it is stretched. And on some systems they probably find the stretched mode before finding the non-stretched mode with the same dimensions. Voila - stretched game.
You can correct this for your own software, to some degree, by giving the user options to change the aspect ratio, which means changing the projection matrix. You could then narrow the used area of the display when it is a stretched mode, albeit having to do so manually since Max cannot tell you which modes are stretched. Possibly though once they've chosen a different aspect for the mode they choose you can store this as a default aspect to use and then next time they choose that mode it won't be stretched out. OR, you can also make use of widescreen modes by utilizing a combination of the correct proportion-preserving aspect ratio and making extra use of the available screen width.
But then of course you get into problems such as how to dynamically size the graphics, how to stretch your heads-up-display, how to deal with GUI stretching, how the game can be fair when a user with a widescreen sees more of the play area, etc.