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/setup/display.c | 79 ----------------------------------------------------- 1 file changed, 79 deletions(-) (limited to 'src/setup') 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