diff options
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; |