From 710e6b12d1b1bf11b2edd09100a964b7ca9dd053 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Tue, 15 Oct 2013 04:01:46 +0000 Subject: Rip out special casing on Windows that defaults to the SDL directx driver over the Windows GDI one. This causes far too many problems. Subversion-branch: /branches/v2-branch Subversion-revision: 2710 --- src/i_video.c | 30 -------------------- src/setup/display.c | 79 ----------------------------------------------------- 2 files changed, 109 deletions(-) diff --git a/src/i_video.c b/src/i_video.c index 07c5b3b7..81dc9b66 100644 --- a/src/i_video.c +++ b/src/i_video.c @@ -1851,36 +1851,6 @@ static void SetSDLVideoDriver(void) putenv(env_string); free(env_string); } - -#if defined(_WIN32) && !defined(_WIN32_WCE) - - // Allow -gdi as a shortcut for using the windib driver. - - //! - // @category video - // @platform windows - // - // Use the Windows GDI driver instead of DirectX. - // - - if (M_CheckParm("-gdi") > 0) - { - putenv("SDL_VIDEODRIVER=windib"); - } - - // From the SDL 1.2.10 release notes: - // - // > The "windib" video driver is the default now, to prevent - // > problems with certain laptops, 64-bit Windows, and Windows - // > Vista. - // - // The hell with that. - - if (getenv("SDL_VIDEODRIVER") == NULL) - { - putenv("SDL_VIDEODRIVER=directx"); - } -#endif } static void SetWindowPositionVars(void) diff --git a/src/setup/display.c b/src/setup/display.c index e988e36f..4fd4f3b7 100644 --- a/src/setup/display.c +++ b/src/setup/display.c @@ -155,14 +155,6 @@ void SetDisplayDriver(void) putenv(env_string); free(env_string); } - else - { -#if defined(_WIN32) && !defined(_WIN32_WCE) - // On Windows, use DirectX over windib by default. - - putenv("SDL_VIDEODRIVER=directx"); -#endif - } } // Query SDL as to whether any fullscreen modes are available for the @@ -540,54 +532,6 @@ static void UpdateModeSeparator(TXT_UNCAST_ARG(widget), } } -#if defined(_WIN32) && !defined(_WIN32_WCE) - -static int use_directx = 1; - -static void SetWin32VideoDriver(void) -{ - if (!strcmp(video_driver, "windib")) - { - use_directx = 0; - } - else - { - use_directx = 1; - } -} - -static void UpdateVideoDriver(TXT_UNCAST_ARG(widget), - TXT_UNCAST_ARG(modes_table)) -{ - TXT_CAST_ARG(txt_table_t, modes_table); - - if (use_directx) - { - video_driver = ""; - } - else - { - video_driver = "windib"; - } - - // When the video driver is changed, we need to restart the textscreen - // library. - - RestartTextscreen(); - - // Rebuild the list of supported pixel depths. - - IdentifyPixelDepths(); - SetSelectedBPP(); - - // Rebuild the video modes list - - BuildFullscreenModesList(); - GenerateModesTable(NULL, modes_table); -} - -#endif - static void AdvancedDisplayConfig(TXT_UNCAST_ARG(widget), TXT_UNCAST_ARG(modes_table)) { @@ -618,29 +562,6 @@ static void AdvancedDisplayConfig(TXT_UNCAST_ARG(widget), } TXT_SignalConnect(ar_checkbox, "changed", GenerateModesTable, modes_table); - - // On Windows, there is an extra control to change between - // the Windows GDI and DirectX video drivers. - -#if defined(_WIN32) && !defined(_WIN32_WCE) - { - txt_radiobutton_t *dx_button, *gdi_button; - - TXT_AddWidgets(window, - TXT_NewSeparator("Windows video driver"), - dx_button = TXT_NewRadioButton("DirectX", - &use_directx, 1), - gdi_button = TXT_NewRadioButton("Windows GDI", - &use_directx, 0), - NULL); - - TXT_SignalConnect(dx_button, "selected", - UpdateVideoDriver, modes_table); - TXT_SignalConnect(gdi_button, "selected", - UpdateVideoDriver, modes_table); - SetWin32VideoDriver(); - } -#endif } void ConfigDisplay(void) -- cgit v1.2.3