Re: [AD] [4.2]/[4.4]: Added detection of Windows 7

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


On 2011-03-15, Andrei Ellman <ae-a-alleg@xxxxxxxxxx> wrote:
> Currently, the 4.2 and 4.4 branches do not detect versions of
> Windows higher than Windows Vista. The included patch adds the
> ability to distinguish Windows Vista and Windows 7. Windows server
> 2008 is not detected directly (this would require a re-write of
> sys_directx_init() to use GetVersionEx() instead of GetVersion()).
> With the patch, Windows server 2008will either register as Windows
> Vista (if not using R2) or Windows 7 (if using R2)).
> 
> Here is a summary of the changes.
> 
> system.h
> + Added a #define for OSTYPE_WIN7
> wsystem.c
> + Made it detect Windows 7.
> 
> wsystem.c is identical in both 4.2.3.1 and 4.4.1.1 . system.h is
> slightly different in 4.4.1.1 but the patch should be able to be
> applied to both versions as the change occurs before the first
> difference between the two versions.
> 
> I don't have access to a Windows Vista machine and have only tested
> it on Windows 7.

Thanks.

> PS. I had a look at 5.0.1 to see how that handled OS detection, but
> I was unable to find it. I tried both the online manual and
> downloading the source and doing a search for 'vista'. The only
> occurance of GetVersion[Ex]()  was in one of the DirectX files and
> was only used for treating things differently under Vista. How is OS
> detection handled in 5.x?

We don't do it, and hopefully never will.

Peter




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