Re: [AD] Proposing patch in windows detection

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Peter Wang wrote:

On 2005-11-27, aj <aj@xxxxxxxxxx> wrote:
Peter Wang wrote:
What is the point of detecting the Windows versions?
For programming purposes, it tells you which win32::functions are supported.

If we didn't check which version is running, and make code that runs on all systems, we would still be targeting win95.

It also allows you to better guess the minimum platform for such things as DirectX version... which is another nightmare to obtain.

Note that Allegro never makes use of the os_type variable in the Windows
port, so this argument is not very good.  If you're writing Windows-
specific code that actually requires detecting the OS version, you'd be
better off (1) doing it yourself,

Allegro offers this os_type var to the programmer, so either we fix it to show the correct platform, or we remove it (not likely to happen).


(2) detecting whether the OS has the
functionality you're after rather than using the OS version as a guide.

There is no way to detect some functions, you have to decide on which platform you want to target, then set some environment vars for the platform SDK to configure itself for that platform. Allegro internals will most likely do this at some point.




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/