Removed Windows CE support from SDL 2.0.
authorRyan C. Gordon <icculus@icculus.org>
Sat, 15 Sep 2012 10:59:39 -0400
changeset 643048d519500f7e
parent 6429 ff5e34883bf8
child 6431 1f9c0e93bd96
Removed Windows CE support from SDL 2.0.

It's a long-dead platform, and we don't have any way to build for, test, or
maintain it, so there's no sense in doing acrobatics to support it.

If you need Windows CE support, use SDL 1.2. If you need Windows Phone support,
send SDL 2.0 patches for the newer Windows Mobile platform.
README.WinCE
configure.in
include/SDL_assert.h
include/SDL_atomic.h
include/SDL_config.h.in
include/SDL_config_windows.h
include/SDL_cpuinfo.h
include/SDL_thread.h
src/SDL.c
src/audio/SDL_audio.c
src/audio/winmm/SDL_winmm.c
src/file/SDL_rwops.c
src/loadso/windows/SDL_sysloadso.c
src/main/windows/SDL_windows_main.c
src/power/windows/SDL_syspower.c
src/stdlib/SDL_getenv.c
src/thread/windows/SDL_sysmutex.c
src/thread/windows/SDL_syssem.c
src/thread/windows/SDL_systhread.c
src/thread/windows/win_ce_semaphore.c
src/thread/windows/win_ce_semaphore.h
src/timer/SDL_timer.c
src/timer/wince/SDL_systimer.c
src/timer/windows/SDL_systimer.c
src/video/SDL_stretch.c
src/video/windows/SDL_windowsclipboard.c
src/video/windows/SDL_windowsevents.c
src/video/windows/SDL_windowsframebuffer.c
src/video/windows/SDL_windowskeyboard.c
src/video/windows/SDL_windowsmodes.c
src/video/windows/SDL_windowsvideo.c
src/video/windows/SDL_windowsvideo.h
src/video/windows/SDL_windowswindow.c
src/video/windows/SDL_windowswindow.h
     1.1 --- a/README.WinCE	Fri Sep 14 18:18:38 2012 -0400
     1.2 +++ b/README.WinCE	Sat Sep 15 10:59:39 2012 -0400
     1.3 @@ -1,55 +1,9 @@
     1.4  
     1.5 -Project files for embedded Visual C++ 3.0, 4.0 and 
     1.6 -Visual Studio 2005 can be found in VisualCE.zip
     1.7 +Windows CE is no longer supported by SDL.
     1.8  
     1.9 -SDL supports GAPI and WinDib output for Windows CE.
    1.10 +We have left the CE support in SDL 1.2 for those that must have it, and we
    1.11 +will accept patches that support more modern Windows Mobile platforms for
    1.12 +SDL 2.0.
    1.13  
    1.14 -GAPI driver supports:
    1.15 +--ryan.
    1.16  
    1.17 -- all possible WinCE devices (Pocket PC, Smartphones, HPC)
    1.18 -  with different orientations of video memory and resolutions.
    1.19 -- 4, 8 and 16 bpp devices
    1.20 -- special handling of 8bpp on 8bpp devices
    1.21 -- VGA mode, you can even switch between VGA and GAPI in runtime
    1.22 -  (between 240x320 and 480x640 for example). On VGA devices you can
    1.23 -  use either GAPI or VGA.
    1.24 -- Landscape mode and automatic rotation of buttons and stylus coordinates.
    1.25 -  To enable landscape mode make width of video screen bigger than height.
    1.26 -  For example: 
    1.27 -    SDL_SetVideoMode(320,240,16,SDL_FULLSCREEN)
    1.28 -- WM2005
    1.29 -- SDL_ListModes
    1.30 -
    1.31 -NOTE:
    1.32 -There are several SDL features not available in the WinCE port of SDL.
    1.33 -
    1.34 -- DirectX is not yet available
    1.35 -- Semaphores are not available
    1.36 -- Joystick support is not available
    1.37 -- CD-ROM control is not available
    1.38 -
    1.39 -In addition, there are several features that run in "degraded" mode:
    1.40 -
    1.41 -Preprocessor Symbol		Effect
    1.42 -===================		=================================
    1.43 -
    1.44 -SDL_systimer.c:
    1.45 -USE_GETTICKCOUNT		Less accurate values for SDL time functions
    1.46 -USE_SETTIMER			Use only a single marginally accurate timer
    1.47 -
    1.48 -SDL_syswm.c:
    1.49 -DISABLE_ICON_SUPPORT		Can't set the runtime window icon
    1.50 -
    1.51 -SDL_sysmouse.c:
    1.52 -USE_STATIC_CURSOR		Only the arrow cursor is available
    1.53 -
    1.54 -SDL_sysevents.c:
    1.55 -NO_GETKEYBOARDSTATE		Can't get modifier state on keyboard focus
    1.56 -
    1.57 -SDL_dibevents.c:
    1.58 -NO_GETKEYBOARDSTATE		Very limited keycode translation
    1.59 -
    1.60 -SDL_dibvideo.c:
    1.61 -NO_GETDIBITS			Can't distinguish between 15 bpp and 16 bpp
    1.62 -NO_CHANGEDISPLAYSETTINGS	No fullscreen support
    1.63 -NO_GAMMA_SUPPORT		Gamma correction not available
     2.1 --- a/configure.in	Fri Sep 14 18:18:38 2012 -0400
     2.2 +++ b/configure.in	Sat Sep 15 10:59:39 2012 -0400
     2.3 @@ -1908,6 +1908,8 @@
     2.4      ],[
     2.5      ],[
     2.6      have_wince=yes
     2.7 +       AC_MSG_ERROR([
     2.8 +*** Sorry, Windows CE is no longer supported.
     2.9      ])
    2.10      AC_MSG_RESULT($have_wince)
    2.11  
    2.12 @@ -2239,82 +2241,6 @@
    2.13              have_timers=yes
    2.14          fi
    2.15          ;;
    2.16 -    *-wince* | *-mingw32ce)
    2.17 -        ARCH=win32
    2.18 -        CheckDummyVideo
    2.19 -        CheckDiskAudio
    2.20 -        CheckDummyAudio
    2.21 -        CheckWINDOWS
    2.22 -        if test x$enable_video = xyes; then
    2.23 -            AC_DEFINE(SDL_VIDEO_DRIVER_WINDOWS, 1, [ ])
    2.24 -            SOURCES="$SOURCES $srcdir/src/video/windows/*.c"
    2.25 -            have_video=yes
    2.26 -            AC_ARG_ENABLE(render-d3d,
    2.27 -AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[default=yes]]]),
    2.28 -                                , enable_render_d3d=yes)
    2.29 -            enable_render_d3d=no
    2.30 -            if test x$enable_render_d3d = xyes -a x$have_d3d = xyes; then
    2.31 -                AC_DEFINE(SDL_VIDEO_RENDER_D3D, 1, [ ])
    2.32 -            fi
    2.33 -        fi
    2.34 -        # Set up files for the audio library
    2.35 -        if test x$enable_audio = xyes; then
    2.36 -            AC_DEFINE(SDL_AUDIO_DRIVER_WINMM, 1, [ ])
    2.37 -            SOURCES="$SOURCES $srcdir/src/audio/winmm/*.c"
    2.38 -            if test x$have_dsound = xyes; then
    2.39 -                AC_DEFINE(SDL_AUDIO_DRIVER_DSOUND, 1, [ ])
    2.40 -                SOURCES="$SOURCES $srcdir/src/audio/directsound/*.c"
    2.41 -            fi
    2.42 -            if test x$have_xaudio2 = xyes; then
    2.43 -                AC_DEFINE(SDL_AUDIO_DRIVER_XAUDIO2, 1, [ ])
    2.44 -                SOURCES="$SOURCES $srcdir/src/audio/xaudio2/*.c"
    2.45 -            fi
    2.46 -            have_audio=yes
    2.47 -        fi
    2.48 -        # Set up dummy files for the joystick for now
    2.49 -        if test x$enable_joystick = xyes; then
    2.50 -            AC_DEFINE(SDL_JOYSTICK_DUMMY, 1, [ ])
    2.51 -            SOURCES="$SOURCES $srcdir/src/joystick/dummy/*.c"
    2.52 -            have_joystick=yes
    2.53 -        fi
    2.54 -        # Set up files for the thread library
    2.55 -        if test x$enable_threads = xyes; then
    2.56 -            AC_DEFINE(SDL_THREAD_WINDOWS, 1, [ ])
    2.57 -            SOURCES="$SOURCES $srcdir/src/thread/windows/SDL_sysmutex.c"
    2.58 -            SOURCES="$SOURCES $srcdir/src/thread/windows/SDL_syssem.c"
    2.59 -            SOURCES="$SOURCES $srcdir/src/thread/windows/SDL_systhread.c"
    2.60 -            SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
    2.61 -            have_threads=yes
    2.62 -        fi
    2.63 -        # Set up files for the timer library
    2.64 -        if test x$enable_timers = xyes; then
    2.65 -            AC_DEFINE(SDL_TIMER_WINCE, 1, [ ])
    2.66 -            SOURCES="$SOURCES $srcdir/src/timer/wince/*.c"
    2.67 -            have_timers=yes
    2.68 -        fi
    2.69 -        # Set up files for the shared object loading library
    2.70 -        if test x$enable_loadso = xyes; then
    2.71 -            AC_DEFINE(SDL_LOADSO_WINDOWS, 1, [ ])
    2.72 -            SOURCES="$SOURCES $srcdir/src/loadso/windows/*.c"
    2.73 -            have_loadso=yes
    2.74 -        fi
    2.75 -        # Set up the system libraries we need
    2.76 -        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lcoredll -lcommctrl -lmmtimer"
    2.77 -
    2.78 -	# mingw32ce library
    2.79 -	case "$host" in
    2.80 -    	    *-mingw32ce)
    2.81 -    		EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lmingwex"
    2.82 -    		;;
    2.83 -    	    *)
    2.84 -        	;;
    2.85 -	esac
    2.86 -
    2.87 -        # The Windows platform requires special setup
    2.88 -        SDLMAIN_SOURCES="$srcdir/src/main/windows/*.c"
    2.89 -        EXTRA_CFLAGS="$EXTRA_CFLAGS -Dmain=SDL_main -D_WIN32_WCE=0x420"
    2.90 -        EXTRA_LDFLAGS="-lSDL2main $EXTRA_LDFLAGS"
    2.91 -        ;;
    2.92      *-*-cygwin* | *-*-mingw32*)
    2.93          ARCH=win32
    2.94          if test "$build" != "$host"; then # cross-compiling
     3.1 --- a/include/SDL_assert.h	Fri Sep 14 18:18:38 2012 -0400
     3.2 +++ b/include/SDL_assert.h	Sat Sep 15 10:59:39 2012 -0400
     3.3 @@ -49,9 +49,9 @@
     3.4  assert can have unique static variables associated with it.
     3.5  */
     3.6  
     3.7 -#if defined(_MSC_VER) && !defined(_WIN32_WCE)
     3.8 +#if defined(_MSC_VER)
     3.9  /* Don't include intrin.h here because it contains C++ code */
    3.10 -extern void __cdecl __debugbreak(void);
    3.11 +    extern void __cdecl __debugbreak(void);
    3.12      #define SDL_TriggerBreakpoint() __debugbreak()
    3.13  #elif (defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)))
    3.14      #define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
     4.1 --- a/include/SDL_atomic.h	Fri Sep 14 18:18:38 2012 -0400
     4.2 +++ b/include/SDL_atomic.h	Sat Sep 15 10:59:39 2012 -0400
     4.3 @@ -65,7 +65,7 @@
     4.4  
     4.5  /* Need to do this here because intrin.h has C++ code in it */
     4.6  /* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */
     4.7 -#if defined(_MSC_VER) && (_MSC_VER >= 1500) && !defined(_WIN32_WCE)
     4.8 +#if defined(_MSC_VER) && (_MSC_VER >= 1500)
     4.9  #include <intrin.h>
    4.10  #define HAVE_MSC_ATOMICS 1
    4.11  #endif
     5.1 --- a/include/SDL_config.h.in	Fri Sep 14 18:18:38 2012 -0400
     5.2 +++ b/include/SDL_config.h.in	Sat Sep 15 10:59:39 2012 -0400
     5.3 @@ -242,7 +242,6 @@
     5.4  #undef SDL_TIMER_NDS
     5.5  #undef SDL_TIMER_UNIX
     5.6  #undef SDL_TIMER_WINDOWS
     5.7 -#undef SDL_TIMER_WINCE
     5.8  
     5.9  /* Enable various video drivers */
    5.10  #undef SDL_VIDEO_DRIVER_BWINDOW
     6.1 --- a/include/SDL_config_windows.h	Fri Sep 14 18:18:38 2012 -0400
     6.2 +++ b/include/SDL_config_windows.h	Sat Sep 15 10:59:39 2012 -0400
     6.3 @@ -85,9 +85,7 @@
     6.4  #define HAVE_STRING_H 1
     6.5  #define HAVE_CTYPE_H 1
     6.6  #define HAVE_MATH_H 1
     6.7 -#ifndef _WIN32_WCE
     6.8  #define HAVE_SIGNAL_H 1
     6.9 -#endif
    6.10  
    6.11  /* C library functions */
    6.12  #define HAVE_MALLOC 1
    6.13 @@ -143,22 +141,15 @@
    6.14  #endif
    6.15  
    6.16  /* Enable various audio drivers */
    6.17 -#ifndef _WIN32_WCE
    6.18  #define SDL_AUDIO_DRIVER_DSOUND	1
    6.19  #define SDL_AUDIO_DRIVER_XAUDIO2	1
    6.20 -#endif
    6.21  #define SDL_AUDIO_DRIVER_WINMM	1
    6.22  #define SDL_AUDIO_DRIVER_DISK	1
    6.23  #define SDL_AUDIO_DRIVER_DUMMY	1
    6.24  
    6.25  /* Enable various input drivers */
    6.26 -#ifdef _WIN32_WCE
    6.27 -#define SDL_JOYSTICK_DISABLED	1
    6.28 -#define SDL_HAPTIC_DUMMY	1
    6.29 -#else
    6.30  #define SDL_JOYSTICK_DINPUT	1
    6.31  #define SDL_HAPTIC_DINPUT	1
    6.32 -#endif
    6.33  
    6.34  /* Enable various shared object loading systems */
    6.35  #define SDL_LOADSO_WINDOWS	1
    6.36 @@ -167,24 +158,17 @@
    6.37  #define SDL_THREAD_WINDOWS	1
    6.38  
    6.39  /* Enable various timer systems */
    6.40 -#ifdef _WIN32_WCE
    6.41 -#define SDL_TIMER_WINCE	1
    6.42 -#else
    6.43  #define SDL_TIMER_WINDOWS	1
    6.44 -#endif
    6.45  
    6.46  /* Enable various video drivers */
    6.47  #define SDL_VIDEO_DRIVER_DUMMY	1
    6.48  #define SDL_VIDEO_DRIVER_WINDOWS	1
    6.49  
    6.50 -#ifndef _WIN32_WCE
    6.51  #ifndef SDL_VIDEO_RENDER_D3D
    6.52  #define SDL_VIDEO_RENDER_D3D	1
    6.53  #endif
    6.54 -#endif
    6.55  
    6.56  /* Enable OpenGL support */
    6.57 -#ifndef _WIN32_WCE
    6.58  #ifndef SDL_VIDEO_OPENGL
    6.59  #define SDL_VIDEO_OPENGL	1
    6.60  #endif
    6.61 @@ -194,7 +178,6 @@
    6.62  #ifndef SDL_VIDEO_RENDER_OGL
    6.63  #define SDL_VIDEO_RENDER_OGL	1
    6.64  #endif
    6.65 -#endif
    6.66  
    6.67  /* Enable system power support */
    6.68  #define SDL_POWER_WINDOWS 1
     7.1 --- a/include/SDL_cpuinfo.h	Fri Sep 14 18:18:38 2012 -0400
     7.2 +++ b/include/SDL_cpuinfo.h	Sat Sep 15 10:59:39 2012 -0400
     7.3 @@ -32,7 +32,7 @@
     7.4  
     7.5  /* Need to do this here because intrin.h has C++ code in it */
     7.6  /* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */
     7.7 -#if defined(_MSC_VER) && (_MSC_VER >= 1500) && !defined(_WIN32_WCE)
     7.8 +#if defined(_MSC_VER) && (_MSC_VER >= 1500)
     7.9  #include <intrin.h>
    7.10  #ifndef _WIN64
    7.11  #define __MMX__
     8.1 --- a/include/SDL_thread.h	Fri Sep 14 18:18:38 2012 -0400
     8.2 +++ b/include/SDL_thread.h	Sat Sep 15 10:59:39 2012 -0400
     8.3 @@ -86,9 +86,7 @@
     8.4   *  library!
     8.5   */
     8.6  #define SDL_PASSED_BEGINTHREAD_ENDTHREAD
     8.7 -#ifndef _WIN32_WCE
     8.8  #include <process.h>            /* This has _beginthread() and _endthread() defined! */
     8.9 -#endif
    8.10  
    8.11  typedef uintptr_t(__cdecl * pfnSDL_CurrentBeginThread) (void *, unsigned,
    8.12                                                          unsigned (__stdcall *
    8.13 @@ -106,21 +104,11 @@
    8.14                   pfnSDL_CurrentBeginThread pfnBeginThread,
    8.15                   pfnSDL_CurrentEndThread pfnEndThread);
    8.16  
    8.17 -#if defined(_WIN32_WCE)
    8.18 -
    8.19 -/**
    8.20 - *  Create a thread.
    8.21 - */
    8.22 -#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, NULL, NULL)
    8.23 -
    8.24 -#else
    8.25 -
    8.26  /**
    8.27   *  Create a thread.
    8.28   */
    8.29  #define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, _beginthreadex, _endthreadex)
    8.30  
    8.31 -#endif
    8.32  #else
    8.33  
    8.34  /**
     9.1 --- a/src/SDL.c	Fri Sep 14 18:18:38 2012 -0400
     9.2 +++ b/src/SDL.c	Sat Sep 15 10:59:39 2012 -0400
     9.3 @@ -288,11 +288,7 @@
     9.4  #elif __SOLARIS__
     9.5      return "Solaris";
     9.6  #elif __WIN32__
     9.7 -#ifdef _WIN32_WCE
     9.8 -    return "Windows CE";
     9.9 -#else
    9.10      return "Windows";
    9.11 -#endif
    9.12  #elif __IPHONEOS__
    9.13      return "iPhone OS";
    9.14  #else
    10.1 --- a/src/audio/SDL_audio.c	Fri Sep 14 18:18:38 2012 -0400
    10.2 +++ b/src/audio/SDL_audio.c	Sat Sep 15 10:59:39 2012 -0400
    10.3 @@ -1028,7 +1028,7 @@
    10.4          char name[64];
    10.5          SDL_snprintf(name, sizeof (name), "SDLAudioDev%d", (int) (id + 1));
    10.6  /* !!! FIXME: this is nasty. */
    10.7 -#if (defined(__WIN32__) && !defined(_WIN32_WCE)) && !defined(HAVE_LIBC)
    10.8 +#if defined(__WIN32__) && !defined(HAVE_LIBC)
    10.9  #undef SDL_CreateThread
   10.10          device->thread = SDL_CreateThread(SDL_RunAudio, name, device, NULL, NULL);
   10.11  #else
    11.1 --- a/src/audio/winmm/SDL_winmm.c	Fri Sep 14 18:18:38 2012 -0400
    11.2 +++ b/src/audio/winmm/SDL_winmm.c	Sat Sep 15 10:59:39 2012 -0400
    11.3 @@ -31,9 +31,6 @@
    11.4  #include "SDL_audio.h"
    11.5  #include "../SDL_audio_c.h"
    11.6  #include "SDL_winmm.h"
    11.7 -#if defined(_WIN32_WCE) && (_WIN32_WCE < 300)
    11.8 -#include "win_ce_semaphore.h"
    11.9 -#endif
   11.10  
   11.11  #define DETECT_DEV_IMPL(typ, capstyp) \
   11.12  static void DetectWave##typ##Devs(SDL_AddAudioDevice addfn) { \
   11.13 @@ -75,11 +72,7 @@
   11.14          return;
   11.15  
   11.16      /* Signal that we have a new buffer of data */
   11.17 -#if defined(_WIN32_WCE) && (_WIN32_WCE < 300)
   11.18 -    ReleaseSemaphoreCE(this->hidden->audio_sem, 1, NULL);
   11.19 -#else
   11.20      ReleaseSemaphore(this->hidden->audio_sem, 1, NULL);
   11.21 -#endif
   11.22  }
   11.23  
   11.24  
   11.25 @@ -95,11 +88,7 @@
   11.26          return;
   11.27  
   11.28      /* Signal that we are done playing a buffer */
   11.29 -#if defined(_WIN32_WCE) && (_WIN32_WCE < 300)
   11.30 -    ReleaseSemaphoreCE(this->hidden->audio_sem, 1, NULL);
   11.31 -#else
   11.32      ReleaseSemaphore(this->hidden->audio_sem, 1, NULL);
   11.33 -#endif
   11.34  }
   11.35  
   11.36  static void
   11.37 @@ -123,11 +112,7 @@
   11.38  WINMM_WaitDevice(_THIS)
   11.39  {
   11.40      /* Wait for an audio chunk to finish */
   11.41 -#if defined(_WIN32_WCE) && (_WIN32_WCE < 300)
   11.42 -    WaitForSemaphoreCE(this->hidden->audio_sem, INFINITE);
   11.43 -#else
   11.44      WaitForSingleObject(this->hidden->audio_sem, INFINITE);
   11.45 -#endif
   11.46  }
   11.47  
   11.48  static Uint8 *
   11.49 @@ -173,11 +158,7 @@
   11.50          int i;
   11.51  
   11.52          if (this->hidden->audio_sem) {
   11.53 -#if defined(_WIN32_WCE) && (_WIN32_WCE < 300)
   11.54 -            CloseSynchHandle(this->hidden->audio_sem);
   11.55 -#else
   11.56              CloseHandle(this->hidden->audio_sem);
   11.57 -#endif
   11.58              this->hidden->audio_sem = 0;
   11.59          }
   11.60  
   11.61 @@ -349,11 +330,7 @@
   11.62  
   11.63      /* Create the audio buffer semaphore */
   11.64      this->hidden->audio_sem =
   11.65 -#if defined(_WIN32_WCE) && (_WIN32_WCE < 300)
   11.66 -        CreateSemaphoreCE(NULL, NUM_BUFFERS - 1, NUM_BUFFERS, NULL);
   11.67 -#else
   11.68          CreateSemaphore(NULL, NUM_BUFFERS - 1, NUM_BUFFERS, NULL);
   11.69 -#endif
   11.70      if (this->hidden->audio_sem == NULL) {
   11.71          WINMM_CloseDevice(this);
   11.72          SDL_SetError("Couldn't create semaphore");
    12.1 --- a/src/file/SDL_rwops.c	Fri Sep 14 18:18:38 2012 -0400
    12.2 +++ b/src/file/SDL_rwops.c	Sat Sep 15 10:59:39 2012 -0400
    12.3 @@ -43,9 +43,6 @@
    12.4  #ifdef __WIN32__
    12.5  
    12.6  /* Functions to read/write Win32 API file pointers */
    12.7 -/* Will not use it on WinCE because stdio is buffered, it means
    12.8 -   faster, and all stdio functions anyway are embedded in coredll.dll - 
    12.9 -   the main wince dll*/
   12.10  
   12.11  #include "../core/windows/SDL_windows.h"
   12.12  
   12.13 @@ -58,9 +55,7 @@
   12.14  static int SDLCALL
   12.15  windows_file_open(SDL_RWops * context, const char *filename, const char *mode)
   12.16  {
   12.17 -#ifndef _WIN32_WCE
   12.18      UINT old_error_mode;
   12.19 -#endif
   12.20      HANDLE h;
   12.21      DWORD r_right, w_right;
   12.22      DWORD must_exist, truncate;
   12.23 @@ -98,16 +93,6 @@
   12.24          SDL_OutOfMemory();
   12.25          return -1;
   12.26      }
   12.27 -#ifdef _WIN32_WCE
   12.28 -    {
   12.29 -        LPTSTR tstr = WIN_UTF8ToString(filename);
   12.30 -        h = CreateFile(tstr, (w_right | r_right),
   12.31 -                       (w_right) ? 0 : FILE_SHARE_READ, NULL,
   12.32 -                       (must_exist | truncate | a_mode),
   12.33 -                       FILE_ATTRIBUTE_NORMAL, NULL);
   12.34 -        SDL_free(tstr);
   12.35 -    }
   12.36 -#else
   12.37      /* Do not open a dialog box if failure */
   12.38      old_error_mode =
   12.39          SetErrorMode(SEM_NOOPENFILEERRORBOX | SEM_FAILCRITICALERRORS);
   12.40 @@ -123,7 +108,6 @@
   12.41  
   12.42      /* restore old behavior */
   12.43      SetErrorMode(old_error_mode);
   12.44 -#endif /* _WIN32_WCE */
   12.45  
   12.46      if (h == INVALID_HANDLE_VALUE) {
   12.47          SDL_free(context->hidden.windowsio.buffer.data);
    13.1 --- a/src/loadso/windows/SDL_sysloadso.c	Fri Sep 14 18:18:38 2012 -0400
    13.2 +++ b/src/loadso/windows/SDL_sysloadso.c	Sat Sep 15 10:59:39 2012 -0400
    13.3 @@ -49,14 +49,7 @@
    13.4  void *
    13.5  SDL_LoadFunction(void *handle, const char *name)
    13.6  {
    13.7 -#ifdef _WIN32_WCE
    13.8 -    LPTSTR tstr = WIN_UTF8ToString(name);
    13.9 -    void *symbol = (void *) GetProcAddress((HMODULE) handle, tstr);
   13.10 -    SDL_free(tstr);
   13.11 -#else
   13.12      void *symbol = (void *) GetProcAddress((HMODULE) handle, name);
   13.13 -#endif
   13.14 -
   13.15      if (symbol == NULL) {
   13.16          char errbuf[512];
   13.17          SDL_strlcpy(errbuf, "Failed loading ", SDL_arraysize(errbuf));
    14.1 --- a/src/main/windows/SDL_windows_main.c	Fri Sep 14 18:18:38 2012 -0400
    14.2 +++ b/src/main/windows/SDL_windows_main.c	Sat Sep 15 10:59:39 2012 -0400
    14.3 @@ -18,16 +18,9 @@
    14.4  #include "SDL_main.h"
    14.5  
    14.6  #ifdef main
    14.7 -# ifndef _WIN32_WCE_EMULATION
    14.8  #  undef main
    14.9 -# endif /* _WIN32_WCE_EMULATION */
   14.10  #endif /* main */
   14.11  
   14.12 -#if defined(_WIN32_WCE) && _WIN32_WCE < 300
   14.13 -/* seems to be undefined in Win CE although in online help */
   14.14 -#define isspace(a) (((CHAR)a == ' ') || ((CHAR)a == '\t'))
   14.15 -#endif /* _WIN32_WCE < 300 */
   14.16 -
   14.17  static void
   14.18  UnEscapeQuotes(char *arg)
   14.19  {
   14.20 @@ -130,7 +123,7 @@
   14.21      return FALSE;
   14.22  }
   14.23  
   14.24 -#if defined(_MSC_VER) && !defined(_WIN32_WCE)
   14.25 +#if defined(_MSC_VER)
   14.26  /* The VC++ compiler needs main defined */
   14.27  #define console_main main
   14.28  #endif
   14.29 @@ -158,28 +151,9 @@
   14.30      char **argv;
   14.31      int argc;
   14.32      char *cmdline;
   14.33 -#ifdef _WIN32_WCE
   14.34 -    wchar_t *bufp;
   14.35 -    int nLen;
   14.36 -#else
   14.37      char *bufp;
   14.38      size_t nLen;
   14.39 -#endif
   14.40  
   14.41 -#ifdef _WIN32_WCE
   14.42 -    nLen = wcslen(szCmdLine) + 128 + 1;
   14.43 -    bufp = SDL_stack_alloc(wchar_t, nLen * 2);
   14.44 -    wcscpy(bufp, TEXT("\""));
   14.45 -    GetModuleFileName(NULL, bufp + 1, 128 - 3);
   14.46 -    wcscpy(bufp + wcslen(bufp), TEXT("\" "));
   14.47 -    wcsncpy(bufp + wcslen(bufp), szCmdLine, nLen - wcslen(bufp));
   14.48 -    nLen = wcslen(bufp) + 1;
   14.49 -    cmdline = SDL_stack_alloc(char, nLen);
   14.50 -    if (cmdline == NULL) {
   14.51 -        return OutOfMemory();
   14.52 -    }
   14.53 -    WideCharToMultiByte(CP_ACP, 0, bufp, -1, cmdline, nLen, NULL, NULL);
   14.54 -#else
   14.55      /* Grab the command line */
   14.56      bufp = GetCommandLine();
   14.57      nLen = SDL_strlen(bufp) + 1;
   14.58 @@ -188,7 +162,6 @@
   14.59          return OutOfMemory();
   14.60      }
   14.61      SDL_strlcpy(cmdline, bufp, nLen);
   14.62 -#endif
   14.63  
   14.64      /* Parse it into argv and argc */
   14.65      argc = ParseCommandLine(cmdline, NULL);
    15.1 --- a/src/power/windows/SDL_syspower.c	Fri Sep 14 18:18:38 2012 -0400
    15.2 +++ b/src/power/windows/SDL_syspower.c	Sat Sep 15 10:59:39 2012 -0400
    15.3 @@ -30,19 +30,11 @@
    15.4  SDL_bool
    15.5  SDL_GetPowerInfo_Windows(SDL_PowerState * state, int *seconds, int *percent)
    15.6  {
    15.7 -#ifdef _WIN32_WCE
    15.8 -    SYSTEM_POWER_STATUS_EX status;
    15.9 -#else
   15.10      SYSTEM_POWER_STATUS status;
   15.11 -#endif
   15.12      SDL_bool need_details = SDL_FALSE;
   15.13  
   15.14 -    /* This API should exist back to Win95 and Windows CE. */
   15.15 -#ifdef _WIN32_WCE
   15.16 -    if (!GetSystemPowerStatusEx(&status, FALSE))
   15.17 -#else
   15.18 +    /* This API should exist back to Win95. */
   15.19      if (!GetSystemPowerStatus(&status))
   15.20 -#endif
   15.21      {
   15.22          /* !!! FIXME: push GetLastError() into SDL_GetError() */
   15.23          *state = SDL_POWERSTATE_UNKNOWN;
    16.1 --- a/src/stdlib/SDL_getenv.c	Fri Sep 14 18:18:38 2012 -0400
    16.2 +++ b/src/stdlib/SDL_getenv.c	Sat Sep 15 10:59:39 2012 -0400
    16.3 @@ -24,7 +24,7 @@
    16.4  
    16.5  #ifndef HAVE_GETENV
    16.6  
    16.7 -#if defined(__WIN32__) && !defined(_WIN32_WCE)
    16.8 +#if defined(__WIN32__)
    16.9  
   16.10  #include "../core/windows/SDL_windows.h"
   16.11  
    17.1 --- a/src/thread/windows/SDL_sysmutex.c	Fri Sep 14 18:18:38 2012 -0400
    17.2 +++ b/src/thread/windows/SDL_sysmutex.c	Sat Sep 15 10:59:39 2012 -0400
    17.3 @@ -44,12 +44,8 @@
    17.4      mutex = (SDL_mutex *) SDL_malloc(sizeof(*mutex));
    17.5      if (mutex) {
    17.6          /* Initialize */
    17.7 -#ifdef _WIN32_WCE
    17.8 -        InitializeCriticalSection(&mutex->cs);
    17.9 -#else
   17.10          /* On SMP systems, a non-zero spin count generally helps performance */
   17.11          InitializeCriticalSectionAndSpinCount(&mutex->cs, 2000);
   17.12 -#endif
   17.13      } else {
   17.14          SDL_OutOfMemory();
   17.15      }
    18.1 --- a/src/thread/windows/SDL_syssem.c	Fri Sep 14 18:18:38 2012 -0400
    18.2 +++ b/src/thread/windows/SDL_syssem.c	Sat Sep 15 10:59:39 2012 -0400
    18.3 @@ -27,18 +27,10 @@
    18.4  #include "../../core/windows/SDL_windows.h"
    18.5  
    18.6  #include "SDL_thread.h"
    18.7 -#if defined(_WIN32_WCE) && (_WIN32_WCE < 300)
    18.8 -#include "win_ce_semaphore.h"
    18.9 -#endif
   18.10 -
   18.11  
   18.12  struct SDL_semaphore
   18.13  {
   18.14 -#if defined(_WIN32_WCE) && (_WIN32_WCE < 300)
   18.15 -    SYNCHHANDLE id;
   18.16 -#else
   18.17      HANDLE id;
   18.18 -#endif
   18.19      LONG count;
   18.20  };
   18.21  
   18.22 @@ -53,11 +45,7 @@
   18.23      sem = (SDL_sem *) SDL_malloc(sizeof(*sem));
   18.24      if (sem) {
   18.25          /* Create the semaphore, with max value 32K */
   18.26 -#if defined(_WIN32_WCE) && (_WIN32_WCE < 300)
   18.27 -        sem->id = CreateSemaphoreCE(NULL, initial_value, 32 * 1024, NULL);
   18.28 -#else
   18.29          sem->id = CreateSemaphore(NULL, initial_value, 32 * 1024, NULL);
   18.30 -#endif
   18.31          sem->count = initial_value;
   18.32          if (!sem->id) {
   18.33              SDL_SetError("Couldn't create semaphore");
   18.34 @@ -76,11 +64,7 @@
   18.35  {
   18.36      if (sem) {
   18.37          if (sem->id) {
   18.38 -#if defined(_WIN32_WCE) && (_WIN32_WCE < 300)
   18.39 -            CloseSynchHandle(sem->id);
   18.40 -#else
   18.41              CloseHandle(sem->id);
   18.42 -#endif
   18.43              sem->id = 0;
   18.44          }
   18.45          SDL_free(sem);
   18.46 @@ -103,11 +87,7 @@
   18.47      } else {
   18.48          dwMilliseconds = (DWORD) timeout;
   18.49      }
   18.50 -#if defined(_WIN32_WCE) && (_WIN32_WCE < 300)
   18.51 -    switch (WaitForSemaphoreCE(sem->id, dwMilliseconds)) {
   18.52 -#else
   18.53      switch (WaitForSingleObject(sem->id, dwMilliseconds)) {
   18.54 -#endif
   18.55      case WAIT_OBJECT_0:
   18.56          InterlockedDecrement(&sem->count);
   18.57          retval = 0;
   18.58 @@ -159,11 +139,7 @@
   18.59       * is waiting for this semaphore.
   18.60       */
   18.61      InterlockedIncrement(&sem->count);
   18.62 -#if defined(_WIN32_WCE) && (_WIN32_WCE < 300)
   18.63 -    if (ReleaseSemaphoreCE(sem->id, 1, NULL) == FALSE) {
   18.64 -#else
   18.65      if (ReleaseSemaphore(sem->id, 1, NULL) == FALSE) {
   18.66 -#endif
   18.67          InterlockedDecrement(&sem->count);      /* restore */
   18.68          SDL_SetError("ReleaseSemaphore() failed");
   18.69          return -1;
    19.1 --- a/src/thread/windows/SDL_systhread.c	Fri Sep 14 18:18:38 2012 -0400
    19.2 +++ b/src/thread/windows/SDL_systhread.c	Sat Sep 15 10:59:39 2012 -0400
    19.3 @@ -30,10 +30,8 @@
    19.4  #include "SDL_systhread_c.h"
    19.5  
    19.6  #ifndef SDL_PASSED_BEGINTHREAD_ENDTHREAD
    19.7 -#ifndef _WIN32_WCE
    19.8  /* We'll use the C library from this DLL */
    19.9  #include <process.h>
   19.10 -#endif
   19.11  
   19.12  /* Cygwin gcc-3 ... MingW64 (even with a i386 host) does this like MSVC. */
   19.13  #if (defined(__MINGW32__) && (__GNUC__ < 4))
   19.14 @@ -112,13 +110,8 @@
   19.15  int
   19.16  SDL_SYS_CreateThread(SDL_Thread * thread, void *args)
   19.17  {
   19.18 -#ifdef _WIN32_WCE
   19.19 -    pfnSDL_CurrentBeginThread pfnBeginThread = NULL;
   19.20 -    pfnSDL_CurrentEndThread pfnEndThread = NULL;
   19.21 -#else
   19.22      pfnSDL_CurrentBeginThread pfnBeginThread = _beginthreadex;
   19.23      pfnSDL_CurrentEndThread pfnEndThread = _endthreadex;
   19.24 -#endif
   19.25  #endif /* SDL_PASSED_BEGINTHREAD_ENDTHREAD */
   19.26      pThreadStartParms pThreadParms =
   19.27          (pThreadStartParms) SDL_malloc(sizeof(tThreadStartParms));
    20.1 --- a/src/thread/windows/win_ce_semaphore.c	Fri Sep 14 18:18:38 2012 -0400
    20.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.3 @@ -1,233 +0,0 @@
    20.4 -/* win_ce_semaphore.c
    20.5 -
    20.6 -   Copyright (c) 1998, Johnson M. Hart
    20.7 -   (with corrections 2001 by Rainer Loritz)
    20.8 -   Permission is granted for any and all use providing that this
    20.9 -   copyright is properly acknowledged.
   20.10 -   There are no assurances of suitability for any use whatsoever.
   20.11 -
   20.12 -   WINDOWS CE: There is a collection of Windows CE functions to simulate
   20.13 -   semaphores using only a mutex and an event. As Windows CE events cannot
   20.14 -   be named, these simulated semaphores cannot be named either.
   20.15 -
   20.16 -   Implementation notes:
   20.17 -   1. All required internal data structures are allocated on the process's heap.
   20.18 -   2. Where appropriate, a new error code is returned (see the header
   20.19 -      file), or, if the error is a Win32 error, that code is unchanged.
   20.20 -   3. Notice the new handle type "SYNCHHANDLE" that has handles, counters,
   20.21 -      and other information. This structure will grow as new objects are added
   20.22 -      to this set; some members are specific to only one or two of the objects.
   20.23 -   4. Mutexes are used for critical sections. These could be replaced with
   20.24 -      CRITICAL_SECTION objects but then this would give up the time out
   20.25 -      capability.
   20.26 -   5. The implementation shows several interesting aspects of synchronization, some
   20.27 -      of which are specific to Win32 and some of which are general. These are pointed
   20.28 -      out in the comments as appropriate.
   20.29 -   6. The wait function emulates WaitForSingleObject only. An emulation of
   20.30 -      WaitForMultipleObjects is much harder to implement outside the kernel,
   20.31 -      and it is not clear how to handle a mixture of WCE semaphores and normal
   20.32 -      events and mutexes.
   20.33 -*/
   20.34 -#include "SDL_config.h"
   20.35 -
   20.36 -#if SDL_THREAD_WINDOWS
   20.37 -
   20.38 -#include "../../core/windows/SDL_windows.h"
   20.39 -
   20.40 -#include "win_ce_semaphore.h"
   20.41 -
   20.42 -static SYNCHHANDLE CleanUp(SYNCHHANDLE hSynch, DWORD Flags);
   20.43 -
   20.44 -SYNCHHANDLE
   20.45 -CreateSemaphoreCE(LPSECURITY_ATTRIBUTES lpSemaphoreAttributes,  /* pointer to security attributes */
   20.46 -                  LONG lInitialCount,   /* initial count */
   20.47 -                  LONG lMaximumCount,   /* maximum count */
   20.48 -                  LPCTSTR lpName)
   20.49 -/* Semaphore for use with Windows CE that does not support them directly.
   20.50 -   Requires a counter, a mutex to protect the counter, and an
   20.51 -   autoreset event.
   20.52 -
   20.53 -   Here are the rules that must always hold between the autoreset event
   20.54 -   and the mutex (any violation of these rules by the CE semaphore functions
   20.55 -   will, in all likelihood, result in a defect):
   20.56 -    1. No thread can set, pulse, or reset the event,
   20.57 -       nor can it access any part of the SYNCHHANDLE structure,
   20.58 -       without first gaining ownership of the mutex.
   20.59 -       BUT, a thread can wait on the event without owning the mutex
   20.60 -       (this is clearly necessary or else the event could never be set).
   20.61 -    2. The event is in a signaled state if and only if the current semaphore
   20.62 -       count ("CurCount") is greater than zero.
   20.63 -    3. The semaphore count is always >= 0 and <= the maximum count */
   20.64 -{
   20.65 -    SYNCHHANDLE hSynch = NULL, result = NULL;
   20.66 -
   20.67 -    __try {
   20.68 -        if (lInitialCount > lMaximumCount || lMaximumCount < 0
   20.69 -            || lInitialCount < 0) {
   20.70 -            /* Bad parameters */
   20.71 -            SetLastError(SYNCH_ERROR);
   20.72 -            __leave;
   20.73 -        }
   20.74 -
   20.75 -        hSynch =
   20.76 -            HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, SYNCH_HANDLE_SIZE);
   20.77 -        if (hSynch == NULL)
   20.78 -            __leave;
   20.79 -
   20.80 -        hSynch->MaxCount = lMaximumCount;
   20.81 -        hSynch->CurCount = lInitialCount;
   20.82 -        hSynch->lpName = lpName;
   20.83 -
   20.84 -        hSynch->hMutex = CreateMutex(lpSemaphoreAttributes, FALSE, NULL);
   20.85 -
   20.86 -        WaitForSingleObject(hSynch->hMutex, INFINITE);
   20.87 -        /*  Create the event. It is initially signaled if and only if the
   20.88 -           initial count is > 0 */
   20.89 -        hSynch->hEvent = CreateEvent(lpSemaphoreAttributes, FALSE,
   20.90 -                                     lInitialCount > 0, NULL);
   20.91 -        ReleaseMutex(hSynch->hMutex);
   20.92 -        hSynch->hSemph = NULL;
   20.93 -    }
   20.94 -    __finally {
   20.95 -        /* Return with the handle, or, if there was any error, return
   20.96 -           a null after closing any open handles and freeing any allocated memory. */
   20.97 -        result =
   20.98 -            CleanUp(hSynch, 6 /* An event and a mutex, but no semaphore. */ );
   20.99 -    }
  20.100 -
  20.101 -    return result;
  20.102 -}
  20.103 -
  20.104 -BOOL
  20.105 -ReleaseSemaphoreCE(SYNCHHANDLE hSemCE, LONG cReleaseCount,
  20.106 -                   LPLONG lpPreviousCount)
  20.107 -/* Windows CE equivalent to ReleaseSemaphore. */
  20.108 -{
  20.109 -    BOOL Result = TRUE;
  20.110 -
  20.111 -    /* Gain access to the object to assure that the release count
  20.112 -       would not cause the total count to exceed the maximum. */
  20.113 -
  20.114 -    __try {
  20.115 -        WaitForSingleObject(hSemCE->hMutex, INFINITE);
  20.116 -        /* reply only if asked to */
  20.117 -        if (lpPreviousCount != NULL)
  20.118 -            *lpPreviousCount = hSemCE->CurCount;
  20.119 -        if (hSemCE->CurCount + cReleaseCount > hSemCE->MaxCount
  20.120 -            || cReleaseCount <= 0) {
  20.121 -            SetLastError(SYNCH_ERROR);
  20.122 -            Result = FALSE;
  20.123 -            __leave;
  20.124 -        }
  20.125 -        hSemCE->CurCount += cReleaseCount;
  20.126 -
  20.127 -        /*  Set the autoreset event, releasing exactly one waiting thread, now or
  20.128 -           in the future.  */
  20.129 -
  20.130 -        SetEvent(hSemCE->hEvent);
  20.131 -    }
  20.132 -    __finally {
  20.133 -        ReleaseMutex(hSemCE->hMutex);
  20.134 -    }
  20.135 -
  20.136 -    return Result;
  20.137 -}
  20.138 -
  20.139 -DWORD
  20.140 -WaitForSemaphoreCE(SYNCHHANDLE hSemCE, DWORD dwMilliseconds)
  20.141 -   /* Windows CE semaphore equivalent of WaitForSingleObject. */
  20.142 -{
  20.143 -    DWORD WaitResult;
  20.144 -
  20.145 -    WaitResult = WaitForSingleObject(hSemCE->hMutex, dwMilliseconds);
  20.146 -    if (WaitResult != WAIT_OBJECT_0 && WaitResult != WAIT_ABANDONED_0)
  20.147 -        return WaitResult;
  20.148 -    while (hSemCE->CurCount <= 0) {
  20.149 -
  20.150 -        /* The count is 0, and the thread must wait on the event (which, by
  20.151 -           the rules, is currently reset) for semaphore resources to become
  20.152 -           available. First, of course, the mutex must be released so that another
  20.153 -           thread will be capable of setting the event. */
  20.154 -
  20.155 -        ReleaseMutex(hSemCE->hMutex);
  20.156 -
  20.157 -        /*  Wait for the event to be signaled, indicating a semaphore state change.
  20.158 -           The event is autoreset and signaled with a SetEvent (not PulseEvent)
  20.159 -           so exactly one waiting thread (whether or not there is currently
  20.160 -           a waiting thread) is released as a result of the SetEvent. */
  20.161 -
  20.162 -        WaitResult = WaitForSingleObject(hSemCE->hEvent, dwMilliseconds);
  20.163 -        if (WaitResult != WAIT_OBJECT_0)
  20.164 -            return WaitResult;
  20.165 -
  20.166 -        /*  This is where the properties of setting of an autoreset event is critical
  20.167 -           to assure that, even if the semaphore state changes between the
  20.168 -           preceding Wait and the next, and even if NO threads are waiting
  20.169 -           on the event at the time of the SetEvent, at least one thread
  20.170 -           will be released. 
  20.171 -           Pulsing a manual reset event would appear to work, but it would have
  20.172 -           a defect which could appear if the semaphore state changed between
  20.173 -           the two waits. */
  20.174 -
  20.175 -        WaitResult = WaitForSingleObject(hSemCE->hMutex, dwMilliseconds);
  20.176 -        if (WaitResult != WAIT_OBJECT_0 && WaitResult != WAIT_ABANDONED_0)
  20.177 -            return WaitResult;
  20.178 -
  20.179 -    }
  20.180 -    /* The count is not zero and this thread owns the mutex.  */
  20.181 -
  20.182 -    hSemCE->CurCount--;
  20.183 -    /* The event is now unsignaled, BUT, the semaphore count may not be
  20.184 -       zero, in which case the event should be signaled again
  20.185 -       before releasing the mutex. */
  20.186 -
  20.187 -    if (hSemCE->CurCount > 0)
  20.188 -        SetEvent(hSemCE->hEvent);
  20.189 -    ReleaseMutex(hSemCE->hMutex);
  20.190 -    return WaitResult;
  20.191 -}
  20.192 -
  20.193 -BOOL
  20.194 -CloseSynchHandle(SYNCHHANDLE hSynch)
  20.195 -/* Close a synchronization handle. 
  20.196 -   Improvement: Test for a valid handle before dereferencing the handle. */
  20.197 -{
  20.198 -    BOOL Result = TRUE;
  20.199 -    if (hSynch->hEvent != NULL)
  20.200 -        Result = Result && CloseHandle(hSynch->hEvent);
  20.201 -    if (hSynch->hMutex != NULL)
  20.202 -        Result = Result && CloseHandle(hSynch->hMutex);
  20.203 -    if (hSynch->hSemph != NULL)
  20.204 -        Result = Result && CloseHandle(hSynch->hSemph);
  20.205 -    HeapFree(GetProcessHeap(), 0, hSynch);
  20.206 -    return (Result);
  20.207 -}
  20.208 -
  20.209 -static SYNCHHANDLE
  20.210 -CleanUp(SYNCHHANDLE hSynch, DWORD Flags)
  20.211 -{                               /* Prepare to return from a create of a synchronization handle.
  20.212 -                                   If there was any failure, free any allocated resources.
  20.213 -                                   "Flags" indicates which Win32 objects are required in the 
  20.214 -                                   synchronization handle. */
  20.215 -
  20.216 -    BOOL ok = TRUE;
  20.217 -
  20.218 -    if (hSynch == NULL)
  20.219 -        return NULL;
  20.220 -    if ((Flags & 4) == 1 && (hSynch->hEvent == NULL))
  20.221 -        ok = FALSE;
  20.222 -    if ((Flags & 2) == 1 && (hSynch->hMutex == NULL))
  20.223 -        ok = FALSE;
  20.224 -    if ((Flags & 1) == 1 && (hSynch->hEvent == NULL))
  20.225 -        ok = FALSE;
  20.226 -    if (!ok) {
  20.227 -        CloseSynchHandle(hSynch);
  20.228 -        return NULL;
  20.229 -    }
  20.230 -    /* Everything worked */
  20.231 -    return hSynch;
  20.232 -}
  20.233 -
  20.234 -#endif /* SDL_THREAD_WINDOWS */
  20.235 -
  20.236 -/* vi: set ts=4 sw=4 expandtab: */
    21.1 --- a/src/thread/windows/win_ce_semaphore.h	Fri Sep 14 18:18:38 2012 -0400
    21.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.3 @@ -1,25 +0,0 @@
    21.4 -/* win_ce_semaphore.h - header file to go with win_ce_semaphore.c */
    21.5 -
    21.6 -typedef struct _SYNCH_HANDLE_STRUCTURE
    21.7 -{
    21.8 -    HANDLE hEvent;
    21.9 -    HANDLE hMutex;
   21.10 -    HANDLE hSemph;
   21.11 -    LONG MaxCount;
   21.12 -    volatile LONG CurCount;
   21.13 -    LPCTSTR lpName;
   21.14 -} SYNCH_HANDLE_STRUCTURE, *SYNCHHANDLE;
   21.15 -
   21.16 -#define SYNCH_HANDLE_SIZE sizeof (SYNCH_HANDLE_STRUCTURE)
   21.17 -
   21.18 -        /* Error codes - all must have bit 29 set */
   21.19 -#define SYNCH_ERROR 0X20000000  /* EXERCISE - REFINE THE ERROR NUMBERS */
   21.20 -
   21.21 -extern SYNCHHANDLE CreateSemaphoreCE(LPSECURITY_ATTRIBUTES, LONG, LONG,
   21.22 -                                     LPCTSTR);
   21.23 -
   21.24 -extern BOOL ReleaseSemaphoreCE(SYNCHHANDLE, LONG, LPLONG);
   21.25 -extern DWORD WaitForSemaphoreCE(SYNCHHANDLE, DWORD);
   21.26 -
   21.27 -extern BOOL CloseSynchHandle(SYNCHHANDLE);
   21.28 -/* vi: set ts=4 sw=4 expandtab: */
    22.1 --- a/src/timer/SDL_timer.c	Fri Sep 14 18:18:38 2012 -0400
    22.2 +++ b/src/timer/SDL_timer.c	Sat Sep 15 10:59:39 2012 -0400
    22.3 @@ -223,7 +223,7 @@
    22.4  
    22.5          data->active = SDL_TRUE;
    22.6          /* !!! FIXME: this is nasty. */
    22.7 -#if (defined(__WIN32__) && !defined(_WIN32_WCE)) && !defined(HAVE_LIBC)
    22.8 +#if defined(__WIN32__) && !defined(HAVE_LIBC)
    22.9  #undef SDL_CreateThread
   22.10          data->thread = SDL_CreateThread(SDL_TimerThread, name, data, NULL, NULL);
   22.11  #else
    23.1 --- a/src/timer/wince/SDL_systimer.c	Fri Sep 14 18:18:38 2012 -0400
    23.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.3 @@ -1,110 +0,0 @@
    23.4 -/*
    23.5 -  Simple DirectMedia Layer
    23.6 -  Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
    23.7 -
    23.8 -  This software is provided 'as-is', without any express or implied
    23.9 -  warranty.  In no event will the authors be held liable for any damages
   23.10 -  arising from the use of this software.
   23.11 -
   23.12 -  Permission is granted to anyone to use this software for any purpose,
   23.13 -  including commercial applications, and to alter it and redistribute it
   23.14 -  freely, subject to the following restrictions:
   23.15 -
   23.16 -  1. The origin of this software must not be misrepresented; you must not
   23.17 -     claim that you wrote the original software. If you use this software
   23.18 -     in a product, an acknowledgment in the product documentation would be
   23.19 -     appreciated but is not required.
   23.20 -  2. Altered source versions must be plainly marked as such, and must not be
   23.21 -     misrepresented as being the original software.
   23.22 -  3. This notice may not be removed or altered from any source distribution.
   23.23 -*/
   23.24 -#include "SDL_config.h"
   23.25 -
   23.26 -#ifdef SDL_TIMER_WINCE
   23.27 -
   23.28 -#include "../../core/windows/SDL_windows.h"
   23.29 -
   23.30 -#include "SDL_timer.h"
   23.31 -
   23.32 -static Uint64 start_date;
   23.33 -static Uint64 start_ticks;
   23.34 -
   23.35 -static Uint64
   23.36 -wce_ticks(void)
   23.37 -{
   23.38 -    return ((Uint64) GetTickCount());
   23.39 -}
   23.40 -
   23.41 -static Uint64
   23.42 -wce_date(void)
   23.43 -{
   23.44 -    union
   23.45 -    {
   23.46 -        FILETIME ftime;
   23.47 -        Uint64 itime;
   23.48 -    } ftime;
   23.49 -    SYSTEMTIME stime;
   23.50 -
   23.51 -    GetSystemTime(&stime);
   23.52 -    SystemTimeToFileTime(&stime, &ftime.ftime);
   23.53 -    ftime.itime /= 10000;       // Convert 100ns intervals to 1ms intervals
   23.54 -    // Remove ms portion, which can't be relied on
   23.55 -    ftime.itime -= (ftime.itime % 1000);
   23.56 -    return (ftime.itime);
   23.57 -}
   23.58 -
   23.59 -static Sint32
   23.60 -wce_rel_ticks(void)
   23.61 -{
   23.62 -    return ((Sint32) (wce_ticks() - start_ticks));
   23.63 -}
   23.64 -
   23.65 -static Sint32
   23.66 -wce_rel_date(void)
   23.67 -{
   23.68 -    return ((Sint32) (wce_date() - start_date));
   23.69 -}
   23.70 -
   23.71 -/* Recard start-time of application for reference */
   23.72 -void
   23.73 -SDL_StartTicks(void)
   23.74 -{
   23.75 -    start_date = wce_date();
   23.76 -    start_ticks = wce_ticks();
   23.77 -}
   23.78 -
   23.79 -/* Return time in ms relative to when SDL was started */
   23.80 -Uint32
   23.81 -SDL_GetTicks()
   23.82 -{
   23.83 -    Sint32 offset = wce_rel_date() - wce_rel_ticks();
   23.84 -    if ((offset < -1000) || (offset > 1000)) {
   23.85 -//    fprintf(stderr,"Time desync(%+d), resyncing\n",offset/1000);
   23.86 -        start_ticks -= offset;
   23.87 -    }
   23.88 -
   23.89 -    return ((Uint32) wce_rel_ticks());
   23.90 -}
   23.91 -
   23.92 -Uint64
   23.93 -SDL_GetPerformanceCounter(void)
   23.94 -{
   23.95 -    return SDL_GetTicks();
   23.96 -}
   23.97 -
   23.98 -Uint64
   23.99 -SDL_GetPerformanceFrequency(void)
  23.100 -{
  23.101 -    return 1000;
  23.102 -}
  23.103 -
  23.104 -/* Give up approx. givem milliseconds to the OS. */
  23.105 -void
  23.106 -SDL_Delay(Uint32 ms)
  23.107 -{
  23.108 -    Sleep(ms);
  23.109 -}
  23.110 -
  23.111 -#endif /* SDL_TIMER_WINCE */
  23.112 -
  23.113 -/* vi: set ts=4 sw=4 expandtab: */
    24.1 --- a/src/timer/windows/SDL_systimer.c	Fri Sep 14 18:18:38 2012 -0400
    24.2 +++ b/src/timer/windows/SDL_systimer.c	Sat Sep 15 10:59:39 2012 -0400
    24.3 @@ -27,10 +27,6 @@
    24.4  
    24.5  #include "SDL_timer.h"
    24.6  
    24.7 -#ifdef _WIN32_WCE
    24.8 -#error This is WinCE. Please use src/timer/wince/SDL_systimer.c instead.
    24.9 -#endif
   24.10 -
   24.11  #define TIME_WRAP_VALUE	(~(DWORD)0)
   24.12  
   24.13  /* The first (low-resolution) ticks value of the application */
    25.1 --- a/src/video/SDL_stretch.c	Fri Sep 14 18:18:38 2012 -0400
    25.2 +++ b/src/video/SDL_stretch.c	Sat Sep 15 10:59:39 2012 -0400
    25.3 @@ -33,7 +33,7 @@
    25.4     into the general blitting mechanism.
    25.5  */
    25.6  
    25.7 -#if ((defined(_MFC_VER) && defined(_M_IX86)/* && !defined(_WIN32_WCE) still needed? */) || \
    25.8 +#if ((defined(_MFC_VER) && defined(_M_IX86)) || \
    25.9       defined(__WATCOMC__) || \
   25.10       (defined(__GNUC__) && defined(__i386__))) && SDL_ASSEMBLY_ROUTINES
   25.11  /* There's a bug with gcc 4.4.1 and -O2 where srcp doesn't get the correct
    26.1 --- a/src/video/windows/SDL_windowsclipboard.c	Fri Sep 14 18:18:38 2012 -0400
    26.2 +++ b/src/video/windows/SDL_windowsclipboard.c	Sat Sep 15 10:59:39 2012 -0400
    26.3 @@ -92,11 +92,7 @@
    26.4                  WIN_SetError("Couldn't set clipboard data");
    26.5                  result = -1;
    26.6              }
    26.7 -#ifdef _WIN32_WCE
    26.8 -            data->clipboard_count = 0;
    26.9 -#else
   26.10              data->clipboard_count = GetClipboardSequenceNumber();
   26.11 -#endif
   26.12          }
   26.13          SDL_free(tstr);
   26.14  
   26.15 @@ -150,13 +146,7 @@
   26.16  void
   26.17  WIN_CheckClipboardUpdate(struct SDL_VideoData * data)
   26.18  {
   26.19 -    DWORD count;
   26.20 -
   26.21 -#ifdef _WIN32_WCE
   26.22 -    count = 0;
   26.23 -#else
   26.24 -    count = GetClipboardSequenceNumber();
   26.25 -#endif
   26.26 +    const DWORD count = GetClipboardSequenceNumber();
   26.27      if (count != data->clipboard_count) {
   26.28          if (data->clipboard_count) {
   26.29              SDL_SendClipboardUpdate();
    27.1 --- a/src/video/windows/SDL_windowsevents.c	Fri Sep 14 18:18:38 2012 -0400
    27.2 +++ b/src/video/windows/SDL_windowsevents.c	Sat Sep 15 10:59:39 2012 -0400
    27.3 @@ -164,12 +164,10 @@
    27.4                  SDL_SendWindowEvent(data->window, SDL_WINDOWEVENT_SHOWN, 0, 0);
    27.5                  SDL_SendWindowEvent(data->window,
    27.6                                      SDL_WINDOWEVENT_RESTORED, 0, 0);
    27.7 -#ifndef _WIN32_WCE              /* WinCE misses IsZoomed() */
    27.8                  if (IsZoomed(hwnd)) {
    27.9                      SDL_SendWindowEvent(data->window,
   27.10                                          SDL_WINDOWEVENT_MAXIMIZED, 0, 0);
   27.11                  }
   27.12 -#endif
   27.13                  if (SDL_GetKeyboardFocus() != data->window) {
   27.14                      SDL_SetKeyboardFocus(data->window);
   27.15                  }
   27.16 @@ -211,20 +209,6 @@
   27.17  	case WM_MOUSEMOVE:
   27.18  		if(SDL_GetMouse()->relative_mode)
   27.19  			break;
   27.20 -#ifdef _WIN32_WCE
   27.21 -        /* transform coords for VGA, WVGA... */
   27.22 -        {
   27.23 -            SDL_VideoData *videodata = data->videodata;
   27.24 -            if(videodata->CoordTransform) {
   27.25 -                POINT pt;
   27.26 -                pt.x = LOWORD(lParam);
   27.27 -                pt.y = HIWORD(lParam);
   27.28 -                videodata->CoordTransform(data->window, &pt);
   27.29 -                SDL_SendMouseMotion(data->window, 0, pt.x, pt.y);
   27.30 -                break;
   27.31 -            }
   27.32 -        }
   27.33 -#endif
   27.34          SDL_SendMouseMotion(data->window, 0, LOWORD(lParam), HIWORD(lParam));
   27.35          break;
   27.36  
   27.37 @@ -463,16 +447,12 @@
   27.38  
   27.39  
   27.40              style = GetWindowLong(hwnd, GWL_STYLE);
   27.41 -#ifdef _WIN32_WCE
   27.42 -            menu = FALSE;
   27.43 -#else
   27.44              /* DJM - according to the docs for GetMenu(), the
   27.45                 return value is undefined if hwnd is a child window.
   27.46                 Aparently it's too difficult for MS to check
   27.47                 inside their function, so I have to do it here.
   27.48               */
   27.49              menu = (style & WS_CHILDWINDOW) ? FALSE : (GetMenu(hwnd) != NULL);
   27.50 -#endif
   27.51              AdjustWindowRectEx(&size, style, menu, 0);
   27.52              w = size.right - size.left;
   27.53              h = size.bottom - size.top;
    28.1 --- a/src/video/windows/SDL_windowsframebuffer.c	Fri Sep 14 18:18:38 2012 -0400
    28.2 +++ b/src/video/windows/SDL_windowsframebuffer.c	Sat Sep 15 10:59:39 2012 -0400
    28.3 @@ -24,18 +24,12 @@
    28.4  
    28.5  #include "SDL_windowsvideo.h"
    28.6  
    28.7 -#ifndef _WIN32_WCE
    28.8 -#define HAVE_GETDIBITS
    28.9 -#endif
   28.10 -
   28.11  int WIN_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, void ** pixels, int *pitch)
   28.12  {
   28.13      SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
   28.14      size_t size;
   28.15      LPBITMAPINFO info;
   28.16 -#ifdef HAVE_GETDIBITS
   28.17      HBITMAP hbm;
   28.18 -#endif
   28.19  
   28.20      /* Free the old framebuffer surface */
   28.21      if (data->mdc) {
   28.22 @@ -49,7 +43,6 @@
   28.23      size = sizeof(BITMAPINFOHEADER) + 256 * sizeof (RGBQUAD);
   28.24      info = (LPBITMAPINFO)SDL_stack_alloc(Uint8, size);
   28.25  
   28.26 -#ifdef HAVE_GETDIBITS
   28.27      SDL_memset(info, 0, size);
   28.28      info->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
   28.29  
   28.30 @@ -69,7 +62,6 @@
   28.31          *format = SDL_MasksToPixelFormatEnum(bpp, masks[0], masks[1], masks[2], 0);
   28.32      }
   28.33      if (*format == SDL_PIXELFORMAT_UNKNOWN)
   28.34 -#endif
   28.35      {
   28.36          /* We'll use RGB format for now */
   28.37          *format = SDL_PIXELFORMAT_RGB888;
    29.1 --- a/src/video/windows/SDL_windowskeyboard.c	Fri Sep 14 18:18:38 2012 -0400
    29.2 +++ b/src/video/windows/SDL_windowskeyboard.c	Sat Sep 15 10:59:39 2012 -0400
    29.3 @@ -22,10 +22,6 @@
    29.4  
    29.5  #if SDL_VIDEO_DRIVER_WINDOWS
    29.6  
    29.7 -#ifdef _WIN32_WCE
    29.8 -#define SDL_DISABLE_WINDOWS_IME
    29.9 -#endif
   29.10 -
   29.11  #include "SDL_windowsvideo.h"
   29.12  
   29.13  #include "../../events/SDL_keyboard_c.h"
    30.1 --- a/src/video/windows/SDL_windowsmodes.c	Fri Sep 14 18:18:38 2012 -0400
    30.2 +++ b/src/video/windows/SDL_windowsmodes.c	Sat Sep 15 10:59:39 2012 -0400
    30.3 @@ -34,9 +34,7 @@
    30.4  {
    30.5      SDL_DisplayModeData *data;
    30.6      DEVMODE devmode;
    30.7 -#ifndef _WIN32_WCE
    30.8      HDC hdc;
    30.9 -#endif
   30.10  
   30.11      devmode.dmSize = sizeof(devmode);
   30.12      devmode.dmDriverExtra = 0;
   30.13 @@ -59,17 +57,7 @@
   30.14      mode->h = devmode.dmPelsHeight;
   30.15      mode->refresh_rate = devmode.dmDisplayFrequency;
   30.16      mode->driverdata = data;
   30.17 -#ifdef _WIN32_WCE
   30.18 -    /* In WinCE EnumDisplaySettings(ENUM_CURRENT_SETTINGS) doesn't take the user defined orientation
   30.19 -       into account but GetSystemMetrics does. */
   30.20 -    if (index == ENUM_CURRENT_SETTINGS) {
   30.21 -        mode->w = GetSystemMetrics(SM_CXSCREEN);
   30.22 -        mode->h = GetSystemMetrics(SM_CYSCREEN);
   30.23 -    }
   30.24 -#endif
   30.25  
   30.26 -/* WinCE has no GetDIBits, therefore we can't use it to get the display format */
   30.27 -#ifndef _WIN32_WCE
   30.28      if (index == ENUM_CURRENT_SETTINGS
   30.29          && (hdc = CreateDC(deviceName, NULL, NULL, NULL)) != NULL) {
   30.30          char bmi_data[sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD)];
   30.31 @@ -105,9 +93,7 @@
   30.32          } else if (bmi->bmiHeader.biBitCount == 4) {
   30.33              mode->format = SDL_PIXELFORMAT_INDEX4LSB;
   30.34          }
   30.35 -    } else
   30.36 -#endif /* _WIN32_WCE */
   30.37 -    {
   30.38 +    } else {
   30.39          /* FIXME: Can we tell what this will be? */
   30.40          if ((devmode.dmFields & DM_BITSPERPEL) == DM_BITSPERPEL) {
   30.41              switch (devmode.dmBitsPerPel) {
   30.42 @@ -233,18 +219,11 @@
   30.43  {
   30.44      SDL_DisplayModeData *data = (SDL_DisplayModeData *) display->current_mode.driverdata;
   30.45  
   30.46 -#ifdef _WIN32_WCE
   30.47 -    // WINCE: DEVMODE.dmPosition not found, or may be mingw32ce bug
   30.48 -    rect->x = 0;
   30.49 -    rect->y = 0;
   30.50 -    rect->w = _this->windows->w;
   30.51 -    rect->h = _this->windows->h;
   30.52 -#else
   30.53      rect->x = (int)data->DeviceMode.dmPosition.x;
   30.54      rect->y = (int)data->DeviceMode.dmPosition.y;
   30.55      rect->w = data->DeviceMode.dmPelsWidth;
   30.56      rect->h = data->DeviceMode.dmPelsHeight;
   30.57 -#endif
   30.58 +
   30.59      return 0;
   30.60  }
   30.61  
   30.62 @@ -278,14 +257,6 @@
   30.63      SDL_DisplayModeData *data = (SDL_DisplayModeData *) mode->driverdata;
   30.64      LONG status;
   30.65  
   30.66 -#ifdef _WIN32_WCE
   30.67 -    /* TODO: implement correctly.
   30.68 -       On my Asus MyPAL, if I execute the code below
   30.69 -       I get DISP_CHANGE_BADFLAGS and the Titlebar of the fullscreen window stays
   30.70 -       visible ... (SDL_RaiseWindow() would fix that one) */
   30.71 -    return 0;
   30.72 -#endif
   30.73 -
   30.74      status =
   30.75          ChangeDisplaySettingsEx(displaydata->DeviceName, &data->DeviceMode,
   30.76                                  NULL, CDS_FULLSCREEN, NULL);
    31.1 --- a/src/video/windows/SDL_windowsvideo.c	Fri Sep 14 18:18:38 2012 -0400
    31.2 +++ b/src/video/windows/SDL_windowsvideo.c	Sat Sep 15 10:59:39 2012 -0400
    31.3 @@ -51,11 +51,6 @@
    31.4      SDL_VideoData *data = (SDL_VideoData *) device->driverdata;
    31.5  
    31.6      SDL_UnregisterApp();
    31.7 -#ifdef _WIN32_WCE
    31.8 -    if(data->hAygShell) {
    31.9 -       SDL_UnloadObject(data->hAygShell);
   31.10 -    }
   31.11 -#endif
   31.12  	if (data->userDLL) {
   31.13  		SDL_UnloadObject(data->userDLL);
   31.14  	}
   31.15 @@ -88,15 +83,6 @@
   31.16      }
   31.17      device->driverdata = data;
   31.18  
   31.19 -#ifdef _WIN32_WCE
   31.20 -    data->hAygShell = SDL_LoadObject("\\windows\\aygshell.dll");
   31.21 -    if(0 == data->hAygShell)
   31.22 -        data->hAygShell = SDL_LoadObject("aygshell.dll");
   31.23 -    data->SHFullScreen = (0 != data->hAygShell ?
   31.24 -        (PFNSHFullScreen) SDL_LoadFunction(data->hAygShell, "SHFullScreen") : 0);
   31.25 -    data->CoordTransform = NULL;
   31.26 -#endif
   31.27 -
   31.28  	data->userDLL = SDL_LoadObject("USER32.DLL");
   31.29  	if (data->userDLL) {
   31.30  		data->CloseTouchInputHandle = (BOOL (WINAPI *)( HTOUCHINPUT )) SDL_LoadFunction(data->userDLL, "CloseTouchInputHandle");
    32.1 --- a/src/video/windows/SDL_windowsvideo.h	Fri Sep 14 18:18:38 2012 -0400
    32.2 +++ b/src/video/windows/SDL_windowsvideo.h	Sat Sep 15 10:59:39 2012 -0400
    32.3 @@ -27,7 +27,7 @@
    32.4  
    32.5  #include "../../core/windows/SDL_windows.h"
    32.6  
    32.7 -#if defined(_MSC_VER) && !defined(_WIN32_WCE)
    32.8 +#if defined(_MSC_VER)
    32.9  #include <msctf.h>
   32.10  #else
   32.11  #include "SDL_msctf.h"
   32.12 @@ -115,12 +115,6 @@
   32.13  {
   32.14      int render;
   32.15  
   32.16 -#ifdef _WIN32_WCE
   32.17 -    void* hAygShell;
   32.18 -    PFNSHFullScreen SHFullScreen;
   32.19 -    PFCoordTransform CoordTransform;
   32.20 -#endif
   32.21 -
   32.22      const SDL_Scancode *key_layout;
   32.23  	DWORD clipboard_count;
   32.24  
    33.1 --- a/src/video/windows/SDL_windowswindow.c	Fri Sep 14 18:18:38 2012 -0400
    33.2 +++ b/src/video/windows/SDL_windowswindow.c	Sat Sep 15 10:59:39 2012 -0400
    33.3 @@ -324,10 +324,7 @@
    33.4          }
    33.5          SDL_FreeSurface(surface);
    33.6  
    33.7 -/* TODO: create the icon in WinCE (CreateIconFromResource isn't available) */
    33.8 -#ifndef _WIN32_WCE
    33.9          hicon = CreateIconFromResource(icon_bmp, icon_len, TRUE, 0x00030000);
   33.10 -#endif
   33.11      }
   33.12      SDL_RWclose(dst);
   33.13      SDL_stack_free(icon_bmp);
   33.14 @@ -361,11 +358,7 @@
   33.15      rect.top = 0;
   33.16      rect.right = window->w;
   33.17      rect.bottom = window->h;
   33.18 -#ifdef _WIN32_WCE
   33.19 -    menu = FALSE;
   33.20 -#else
   33.21      menu = (style & WS_CHILDWINDOW) ? FALSE : (GetMenu(hwnd) != NULL);
   33.22 -#endif
   33.23      AdjustWindowRectEx(&rect, style, menu, 0);
   33.24      w = (rect.right - rect.left);
   33.25      h = (rect.bottom - rect.top);
   33.26 @@ -387,56 +380,18 @@
   33.27      WIN_SetWindowPositionInternal(_this, window, SWP_NOCOPYBITS | SWP_NOMOVE);
   33.28  }
   33.29  
   33.30 -#ifdef _WIN32_WCE
   33.31 -void WINCE_ShowWindow(_THIS, SDL_Window* window, int visible)
   33.32 -{
   33.33 -    SDL_WindowData* windowdata = (SDL_WindowData*) window->driverdata;
   33.34 -    SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;
   33.35 -
   33.36 -    if(visible) {
   33.37 -        if(window->flags & SDL_WINDOW_FULLSCREEN) {
   33.38 -            if(videodata->SHFullScreen)
   33.39 -                videodata->SHFullScreen(windowdata->hwnd, SHFS_HIDETASKBAR | SHFS_HIDESTARTICON | SHFS_HIDESIPBUTTON);
   33.40 -
   33.41 -            ShowWindow(FindWindow(TEXT("HHTaskBar"), NULL), SW_HIDE);
   33.42 -        }
   33.43 -
   33.44 -        ShowWindow(windowdata->hwnd, SW_SHOW);
   33.45 -        SetForegroundWindow(windowdata->hwnd);
   33.46 -    } else {
   33.47 -        ShowWindow(windowdata->hwnd, SW_HIDE);
   33.48 -
   33.49 -        if(window->flags & SDL_WINDOW_FULLSCREEN) {
   33.50 -            if(videodata->SHFullScreen)
   33.51 -                videodata->SHFullScreen(windowdata->hwnd, SHFS_SHOWTASKBAR | SHFS_SHOWSTARTICON | SHFS_SHOWSIPBUTTON);
   33.52 -
   33.53 -            ShowWindow(FindWindow(TEXT("HHTaskBar"), NULL), SW_SHOW);
   33.54 -
   33.55 -        }
   33.56 -    }
   33.57 -}
   33.58 -#endif /* _WIN32_WCE */
   33.59 -
   33.60  void
   33.61  WIN_ShowWindow(_THIS, SDL_Window * window)
   33.62  {
   33.63 -#ifdef _WIN32_WCE
   33.64 -    WINCE_ShowWindow(_this, window, 1);
   33.65 -#else
   33.66      HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
   33.67      ShowWindow(hwnd, SW_SHOW);
   33.68 -#endif
   33.69  }
   33.70  
   33.71  void
   33.72  WIN_HideWindow(_THIS, SDL_Window * window)
   33.73  {
   33.74 -#ifdef _WIN32_WCE
   33.75 -    WINCE_ShowWindow(_this, window, 0);
   33.76 -#else
   33.77      HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
   33.78      ShowWindow(hwnd, SW_HIDE);
   33.79 -#endif
   33.80  }
   33.81  
   33.82  void
   33.83 @@ -457,14 +412,6 @@
   33.84  WIN_MaximizeWindow(_THIS, SDL_Window * window)
   33.85  {
   33.86      HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
   33.87 -
   33.88 -#ifdef _WIN32_WCE
   33.89 -    if((window->flags & SDL_WINDOW_FULLSCREEN) && videodata->SHFullScreen) {
   33.90 -        SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;
   33.91 -        videodata->SHFullScreen(hwnd, SHFS_HIDETASKBAR | SHFS_HIDESTARTICON | SHFS_HIDESIPBUTTON);
   33.92 -    }
   33.93 -#endif
   33.94 -
   33.95      ShowWindow(hwnd, SW_MAXIMIZE);
   33.96  }
   33.97  
   33.98 @@ -472,15 +419,7 @@
   33.99  WIN_MinimizeWindow(_THIS, SDL_Window * window)
  33.100  {
  33.101      HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
  33.102 -
  33.103      ShowWindow(hwnd, SW_MINIMIZE);
  33.104 -
  33.105 -#ifdef _WIN32_WCE
  33.106 -    if((window->flags & SDL_WINDOW_FULLSCREEN) && videodata->SHFullScreen) {
  33.107 -        SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;
  33.108 -        videodata->SHFullScreen(hwnd, SHFS_SHOWTASKBAR | SHFS_SHOWSTARTICON | SHFS_SHOWSIPBUTTON);
  33.109 -    }
  33.110 -#endif
  33.111  }
  33.112  
  33.113  void
  33.114 @@ -543,11 +482,7 @@
  33.115          rect.top = 0;
  33.116          rect.right = window->windowed.w;
  33.117          rect.bottom = window->windowed.h;
  33.118 -#ifdef _WIN32_WCE
  33.119 -        menu = FALSE;
  33.120 -#else
  33.121          menu = (style & WS_CHILDWINDOW) ? FALSE : (GetMenu(hwnd) != NULL);
  33.122 -#endif
  33.123          AdjustWindowRectEx(&rect, style, menu, 0);
  33.124          w = (rect.right - rect.left);
  33.125          h = (rect.bottom - rect.top);
  33.126 @@ -561,10 +496,6 @@
  33.127  int
  33.128  WIN_SetWindowGammaRamp(_THIS, SDL_Window * window, const Uint16 * ramp)
  33.129  {
  33.130 -#ifdef _WIN32_WCE
  33.131 -    SDL_Unsupported();
  33.132 -    return -1;
  33.133 -#else
  33.134      SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
  33.135      SDL_DisplayData *data = (SDL_DisplayData *) display->driverdata;
  33.136      HDC hdc;
  33.137 @@ -579,16 +510,11 @@
  33.138          DeleteDC(hdc);
  33.139      }
  33.140      return succeeded ? 0 : -1;
  33.141 -#endif
  33.142  }
  33.143  
  33.144  int
  33.145  WIN_GetWindowGammaRamp(_THIS, SDL_Window * window, Uint16 * ramp)
  33.146  {
  33.147 -#ifdef _WIN32_WCE
  33.148 -    SDL_Unsupported();
  33.149 -    return -1;
  33.150 -#else
  33.151      SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
  33.152      SDL_DisplayData *data = (SDL_DisplayData *) display->driverdata;
  33.153      HDC hdc;
  33.154 @@ -603,7 +529,6 @@
  33.155          DeleteDC(hdc);
  33.156      }
  33.157      return succeeded ? 0 : -1;
  33.158 -#endif
  33.159  }
  33.160  
  33.161  void
  33.162 @@ -629,9 +554,6 @@
  33.163      SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
  33.164  
  33.165      if (data) {
  33.166 -#ifdef _WIN32_WCE
  33.167 -        WINCE_ShowWindow(_this, window, 0);
  33.168 -#endif
  33.169          ReleaseDC(data->hwnd, data->hdc);
  33.170          if (data->created) {
  33.171              DestroyWindow(data->hwnd);
  33.172 @@ -675,7 +597,6 @@
  33.173  {
  33.174      HINSTANCE hInstance = GetModuleHandle(NULL);
  33.175      WNDCLASS wce;
  33.176 -    HWND hWndParent = NULL;
  33.177  
  33.178      /* Make sure window isn't created twice. */
  33.179      if (SDL_HelperWindow != NULL) {
  33.180 @@ -695,17 +616,12 @@
  33.181          return -1;
  33.182      }
  33.183  
  33.184 -#ifndef _WIN32_WCE
  33.185 -    /* WinCE doesn't have HWND_MESSAGE */
  33.186 -    hWndParent = HWND_MESSAGE;
  33.187 -#endif
  33.188 -
  33.189      /* Create the window. */
  33.190      SDL_HelperWindow = CreateWindowEx(0, SDL_HelperWindowClassName,
  33.191                                        SDL_HelperWindowName,
  33.192                                        WS_OVERLAPPED, CW_USEDEFAULT,
  33.193                                        CW_USEDEFAULT, CW_USEDEFAULT,
  33.194 -                                      CW_USEDEFAULT, hWndParent, NULL,
  33.195 +                                      CW_USEDEFAULT, HWND_MESSAGE, NULL,
  33.196                                        hInstance, NULL);
  33.197      if (SDL_HelperWindow == NULL) {
  33.198          UnregisterClass(SDL_HelperWindowClassName, hInstance);
    34.1 --- a/src/video/windows/SDL_windowswindow.h	Fri Sep 14 18:18:38 2012 -0400
    34.2 +++ b/src/video/windows/SDL_windowswindow.h	Sat Sep 15 10:59:39 2012 -0400
    34.3 @@ -23,15 +23,6 @@
    34.4  #ifndef _SDL_windowswindow_h
    34.5  #define _SDL_windowswindow_h
    34.6  
    34.7 -#ifdef _WIN32_WCE
    34.8 -#define SHFS_SHOWTASKBAR        0x0001
    34.9 -#define SHFS_HIDETASKBAR        0x0002
   34.10 -#define SHFS_SHOWSIPBUTTON      0x0004
   34.11 -#define SHFS_HIDESIPBUTTON      0x0008
   34.12 -#define SHFS_SHOWSTARTICON      0x0010
   34.13 -#define SHFS_HIDESTARTICON      0x0020
   34.14 -#endif
   34.15 -
   34.16  typedef struct
   34.17  {
   34.18      SDL_Window *window;