diff options
author | Simon Howard | 2006-11-06 18:04:26 +0000 |
---|---|---|
committer | Simon Howard | 2006-11-06 18:04:26 +0000 |
commit | d0d6c7293373af193bc99989e64f1d5eadba4f31 (patch) | |
tree | 1d2644ba128c7fbcca75e8c04e3e2f663c876eae /src/i_video.c | |
parent | 3e9f2abe794b5511e6f913f825c97fe639464c1b (diff) | |
download | chocolate-doom-d0d6c7293373af193bc99989e64f1d5eadba4f31.tar.gz chocolate-doom-d0d6c7293373af193bc99989e64f1d5eadba4f31.tar.bz2 chocolate-doom-d0d6c7293373af193bc99989e64f1d5eadba4f31.zip |
Use DirectX by default on Windows.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 747
Diffstat (limited to 'src/i_video.c')
-rw-r--r-- | src/i_video.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/i_video.c b/src/i_video.c index 469b113d..fe3ab980 100644 --- a/src/i_video.c +++ b/src/i_video.c @@ -1046,6 +1046,23 @@ void I_InitGraphics(void) SDL_Event dummy; int flags = 0; +#ifdef _WIN32 + + // 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 (SDL_getenv("SDL_VIDEODRIVER") == NULL) + { + SDL_putenv("SDL_VIDEODRIVER=directx"); + } + +#endif + if (SDL_Init(SDL_INIT_VIDEO) < 0) { I_Error("Failed to initialise video: %s", SDL_GetError()); |