From 446d1eb9c8533563c1ebd3be0b13422fd622b9e6 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 7 Jun 2017 09:26:06 +0200 Subject: [PATCH] - we no longer support Windows 9x or NT 4 so its special code may just be removed entirely. --- src/win32/fb_ddraw.cpp | 13 ++---------- src/win32/i_mouse.cpp | 6 +----- src/win32/i_system.cpp | 43 ++++------------------------------------ src/win32/i_system.h | 9 --------- src/win32/win32video.cpp | 7 ------- 5 files changed, 7 insertions(+), 71 deletions(-) diff --git a/src/win32/fb_ddraw.cpp b/src/win32/fb_ddraw.cpp index 729bbaa91..813509bc0 100644 --- a/src/win32/fb_ddraw.cpp +++ b/src/win32/fb_ddraw.cpp @@ -87,7 +87,6 @@ extern IDirectDraw2 *DDraw; // PUBLIC DATA DEFINITIONS ------------------------------------------------- CVAR (Bool, vid_palettehack, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) -CVAR (Bool, vid_attachedsurfaces, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) CVAR (Bool, vid_noblitter, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) CVAR (Int, vid_displaybits, 8, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) CUSTOM_CVAR (Float, rgamma, 1.f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) @@ -264,16 +263,8 @@ bool DDrawFB::CreateResources () } LOG3 ("Mode set to %d x %d x %d\n", Width, Height, bits); - if (vid_attachedsurfaces && OSPlatform == os_WinNT4) - { - if (!CreateSurfacesAttached ()) - return false; - } - else - { - if (!CreateSurfacesComplex ()) - return false; - } + if (!CreateSurfacesComplex ()) + return false; if (UseBlitter) { diff --git a/src/win32/i_mouse.cpp b/src/win32/i_mouse.cpp index 47faa6dc9..f091f5e8c 100644 --- a/src/win32/i_mouse.cpp +++ b/src/win32/i_mouse.cpp @@ -1191,11 +1191,7 @@ void I_StartupMouse () { case 0: default: - if (OSPlatform == os_WinNT4) - { - new_mousemode = MM_Win32; - } - else if (MyRegisterRawInputDevices != NULL) + if (MyRegisterRawInputDevices != NULL) { new_mousemode = MM_RawInput; } diff --git a/src/win32/i_system.cpp b/src/win32/i_system.cpp index 609be2301..a43492abf 100644 --- a/src/win32/i_system.cpp +++ b/src/win32/i_system.cpp @@ -168,7 +168,6 @@ int (*I_GetTime) (bool saveMS); int (*I_WaitForTic) (int); void (*I_FreezeTime) (bool frozen); -os_t OSPlatform; bool gameisdead; // PRIVATE DATA DEFINITIONS ------------------------------------------------ @@ -542,24 +541,7 @@ void I_DetectOS(void) switch (info.dwPlatformId) { - case VER_PLATFORM_WIN32_WINDOWS: - OSPlatform = os_Win95; - if (info.dwMinorVersion < 10) - { - osname = "95"; - } - else if (info.dwMinorVersion < 90) - { - osname = "98"; - } - else - { - osname = "Me"; - } - break; - case VER_PLATFORM_WIN32_NT: - OSPlatform = info.dwMajorVersion < 5 ? os_WinNT4 : os_Win2k; osname = "NT"; if (info.dwMajorVersion == 5) { @@ -605,31 +587,14 @@ void I_DetectOS(void) break; default: - OSPlatform = os_unknown; osname = "Unknown OS"; break; } - if (OSPlatform == os_Win95) - { - if (!batchrun) Printf ("OS: Windows %s %lu.%lu.%lu %s\n", - osname, - info.dwMajorVersion, info.dwMinorVersion, - info.dwBuildNumber & 0xffff, info.szCSDVersion); - } - else - { - if (!batchrun) Printf ("OS: Windows %s (NT %lu.%lu) Build %lu\n %s\n", - osname, - info.dwMajorVersion, info.dwMinorVersion, - info.dwBuildNumber, info.szCSDVersion); - } - - if (OSPlatform == os_unknown) - { - if (!batchrun) Printf ("(Assuming Windows 2000)\n"); - OSPlatform = os_Win2k; - } + if (!batchrun) Printf ("OS: Windows %s (NT %lu.%lu) Build %lu\n %s\n", + osname, + info.dwMajorVersion, info.dwMinorVersion, + info.dwBuildNumber, info.szCSDVersion); } //========================================================================== diff --git a/src/win32/i_system.h b/src/win32/i_system.h index bf09f25ab..c83d3a2cc 100644 --- a/src/win32/i_system.h +++ b/src/win32/i_system.h @@ -47,15 +47,6 @@ extern void SetLanguageIDs (); // [RH] Detects the OS the game is running under. void I_DetectOS (void); -typedef enum { - os_unknown, - os_Win95, - os_WinNT4, - os_Win2k -} os_t; - -extern os_t OSPlatform; - // Called by DoomMain. void I_Init (void); diff --git a/src/win32/win32video.cpp b/src/win32/win32video.cpp index 0546863cb..5a26a876b 100644 --- a/src/win32/win32video.cpp +++ b/src/win32/win32video.cpp @@ -325,13 +325,6 @@ void Win32Video::InitDDraw () } else { - if (OSPlatform == os_Win95) - { - // Windows 95 will let us use Mode X. If we didn't find any linear - // modes in the loop above, add the Mode X modes here. - AddMode (320, 200, 8, 200, 0); - AddMode (320, 240, 8, 240, 0); - } AddLowResModes (); } AddLetterboxModes ();