diff options
author | Simon Howard | 2009-07-13 00:52:26 +0000 |
---|---|---|
committer | Simon Howard | 2009-07-13 00:52:26 +0000 |
commit | 480a31094b7621dd7d65ec05a6e36964dca99b66 (patch) | |
tree | 11b218d674e828c12981d819b8f2396b680436df /setup/display.c | |
parent | 37db69b86bc5052901e250578e9c3920886d79ff (diff) | |
parent | e66653a8a67f3613344ae4ea30b37403d6ff17cf (diff) | |
download | chocolate-doom-480a31094b7621dd7d65ec05a6e36964dca99b66.tar.gz chocolate-doom-480a31094b7621dd7d65ec05a6e36964dca99b66.tar.bz2 chocolate-doom-480a31094b7621dd7d65ec05a6e36964dca99b66.zip |
Merge from trunk.
Subversion-branch: /branches/opl-branch
Subversion-revision: 1624
Diffstat (limited to 'setup/display.c')
-rw-r--r-- | setup/display.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/setup/display.c b/setup/display.c index 5e9d4fcf..596b8a43 100644 --- a/setup/display.c +++ b/setup/display.c @@ -21,6 +21,10 @@ #include <string.h> +#ifdef _WIN32_WCE +#include "libc_wince.h" +#endif + #include "textscreen.h" #include "display.h" @@ -116,7 +120,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"); @@ -187,7 +191,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 @@ -305,7 +316,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; @@ -384,7 +395,8 @@ void ConfigDisplay(void) window = TXT_NewWindow("Display Configuration"); - TXT_SetWindowPosition(window, TXT_HORIZ_CENTER, TXT_VERT_TOP, 40, 5); + TXT_SetWindowPosition(window, TXT_HORIZ_CENTER, TXT_VERT_TOP, + TXT_SCREEN_W / 2, 5); TXT_AddWidgets(window, fs_checkbox = TXT_NewCheckBox("Fullscreen", &fullscreen), @@ -397,7 +409,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; |