[AD] Proposing patch in windows detection |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
diff -u3 Al4.2.0/system.h new/system.h --- Al4.2.0/system.h Tue Mar 15 20:32:44 2005 +++ new/system.h Thu Nov 24 05:45:44 2005 @@ -45,6 +45,9 @@ #define OSTYPE_WINNT AL_ID('W','N','T',' ') #define OSTYPE_WIN2000 AL_ID('W','2','K',' ') #define OSTYPE_WINXP AL_ID('W','X','P',' ') +#define OSTYPE_WIN2003 AL_ID('W','2','K','3') +#define OSTYPE_WINVISTA AL_ID('W','V','S','T') +#define OSTYPE_WINLONGHORN AL_ID('W','L','H',' ') #define OSTYPE_OS2 AL_ID('O','S','2',' ') #define OSTYPE_WARP AL_ID('W','A','R','P') #define OSTYPE_DOSEMU AL_ID('D','E','M','U') diff -u3 Al4.2.0/wsystem.c new/wsystem.c --- Al4.2.0/wsystem.c Mon Aug 22 21:37:18 2005 +++ new/wsystem.c Thu Nov 24 06:13:39 2005 @@ -142,8 +142,18 @@ os_multitasking = TRUE; if (win_ver < 0x80000000) { - if (os_version == 5) { - if(os_revision == 1) + + /* Since doesn't exist os_version == 7 or greater yet, + these will be detected as Longhorn instead of NT. */ + if (os_version >= 6) { + os_type = OSTYPE_WINLONGHORN; + } + else if (os_version == 5) { + /* If in the future a os_revision == 3 or greater comes, + it will be detected as Win2003 instead of Win2000. */ + if (os_revision >= 2) + os_type = OSTYPE_WIN2003; + else if (os_revision == 1) os_type = OSTYPE_WINXP; else os_type = OSTYPE_WIN2000;
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |