diff options
author | Simon Howard | 2009-06-09 18:28:51 +0000 |
---|---|---|
committer | Simon Howard | 2009-06-09 18:28:51 +0000 |
commit | 122dcc372f579c54ba2e6f793493cfa4d0a7d609 (patch) | |
tree | 5df714640d4ae007e95540c89b8f6f0d80f79767 /src/setup/display.c | |
parent | 46ad00deca23f3c57fcaed47af67f9003d6a4048 (diff) | |
parent | b6491fa4aefc073a760d4bad51f55c2d6c0f5f35 (diff) | |
download | chocolate-doom-122dcc372f579c54ba2e6f793493cfa4d0a7d609.tar.gz chocolate-doom-122dcc372f579c54ba2e6f793493cfa4d0a7d609.tar.bz2 chocolate-doom-122dcc372f579c54ba2e6f793493cfa4d0a7d609.zip |
Merge from trunk.
Subversion-branch: /branches/raven-branch
Subversion-revision: 1579
Diffstat (limited to 'src/setup/display.c')
-rw-r--r-- | src/setup/display.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/setup/display.c b/src/setup/display.c index 3efe3ec1..4918d045 100644 --- a/src/setup/display.c +++ b/src/setup/display.c @@ -121,7 +121,7 @@ void SetDisplayDriver(void) } else { -#ifdef _WIN32 +#if defined(_WIN32) && !defined(_WIN32_WCE) // On Windows, use DirectX over windib by default. putenv("SDL_VIDEODRIVER=directx"); @@ -192,7 +192,14 @@ static void BuildFullscreenModesList(void) modes = SDL_ListModes(NULL, SDL_FULLSCREEN); - for (num_modes=0; modes[num_modes] != NULL; ++num_modes); + if (modes == NULL || modes == (SDL_Rect **) -1) + { + num_modes = 0; + } + else + { + for (num_modes=0; modes[num_modes] != NULL; ++num_modes); + } // Build the screen_modes_fullscreen array @@ -310,7 +317,7 @@ static void GenerateModesTable(TXT_UNCAST_ARG(widget), screen_height = modes[vidmode].h; } -#ifdef _WIN32 +#if defined(_WIN32) && !defined(_WIN32_WCE) static int win32_video_driver = 0; @@ -403,7 +410,7 @@ void ConfigDisplay(void) // On Windows, there is an extra control to change between // the Windows GDI and DirectX video drivers. -#ifdef _WIN32 +#if defined(_WIN32) && !defined(_WIN32_WCE) { txt_table_t *driver_table; txt_dropdown_list_t *driver_list; |