mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-22 03:51:42 +00:00
added windows version detection back from original sources
with extra bits from uhexen2. we may use the information some day.. (or not..) git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@354 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
3338df6a52
commit
1a98434926
2 changed files with 33 additions and 1 deletions
|
@ -36,6 +36,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
|
||||||
qboolean isDedicated;
|
qboolean isDedicated;
|
||||||
|
qboolean Win95, Win95old, WinNT, WinVista;
|
||||||
|
|
||||||
static HANDLE hinput, houtput;
|
static HANDLE hinput, houtput;
|
||||||
|
|
||||||
|
@ -145,6 +146,37 @@ int Sys_FileTime (const char *path)
|
||||||
|
|
||||||
void Sys_Init (void)
|
void Sys_Init (void)
|
||||||
{
|
{
|
||||||
|
OSVERSIONINFO vinfo;
|
||||||
|
|
||||||
|
vinfo.dwOSVersionInfoSize = sizeof(vinfo);
|
||||||
|
|
||||||
|
if (!GetVersionEx (&vinfo))
|
||||||
|
Sys_Error ("Couldn't get OS info");
|
||||||
|
|
||||||
|
if ((vinfo.dwMajorVersion < 4) ||
|
||||||
|
(vinfo.dwPlatformId == VER_PLATFORM_WIN32s))
|
||||||
|
{
|
||||||
|
Sys_Error ("QuakeSpasm requires at least Win95 or NT 4.0");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (vinfo.dwPlatformId == VER_PLATFORM_WIN32_NT)
|
||||||
|
{
|
||||||
|
WinNT = true;
|
||||||
|
if (vinfo.dwMajorVersion >= 6)
|
||||||
|
WinVista = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
WinNT = false; /* Win9x or WinME */
|
||||||
|
if ((vinfo.dwMajorVersion == 4) && (vinfo.dwMinorVersion == 0))
|
||||||
|
{
|
||||||
|
Win95 = true;
|
||||||
|
/* Win95-gold or Win95A can't switch bpp automatically */
|
||||||
|
if (vinfo.szCSDVersion[1] != 'C' && vinfo.szCSDVersion[1] != 'B')
|
||||||
|
Win95old = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (isDedicated)
|
if (isDedicated)
|
||||||
{
|
{
|
||||||
if (!AllocConsole ())
|
if (!AllocConsole ())
|
||||||
|
|
|
@ -35,7 +35,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#define WM_MOUSEWHEEL 0x020A
|
#define WM_MOUSEWHEEL 0x020A
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern qboolean WinNT;
|
extern qboolean Win95, Win95old, WinNT, WinVista;
|
||||||
|
|
||||||
extern HINSTANCE global_hInstance;
|
extern HINSTANCE global_hInstance;
|
||||||
extern int global_nCmdShow;
|
extern int global_nCmdShow;
|
||||||
|
|
Loading…
Reference in a new issue