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.
This commit is contained in:
Ryan C. Gordon 2012-09-15 10:59:39 -04:00
parent 8253567b09
commit 5c732d6324
34 changed files with 22 additions and 848 deletions

View file

@ -27,18 +27,10 @@
#include "../../core/windows/SDL_windows.h"
#include "SDL_thread.h"
#if defined(_WIN32_WCE) && (_WIN32_WCE < 300)
#include "win_ce_semaphore.h"
#endif
struct SDL_semaphore
{
#if defined(_WIN32_WCE) && (_WIN32_WCE < 300)
SYNCHHANDLE id;
#else
HANDLE id;
#endif
LONG count;
};
@ -53,11 +45,7 @@ SDL_CreateSemaphore(Uint32 initial_value)
sem = (SDL_sem *) SDL_malloc(sizeof(*sem));
if (sem) {
/* Create the semaphore, with max value 32K */
#if defined(_WIN32_WCE) && (_WIN32_WCE < 300)
sem->id = CreateSemaphoreCE(NULL, initial_value, 32 * 1024, NULL);
#else
sem->id = CreateSemaphore(NULL, initial_value, 32 * 1024, NULL);
#endif
sem->count = initial_value;
if (!sem->id) {
SDL_SetError("Couldn't create semaphore");
@ -76,11 +64,7 @@ SDL_DestroySemaphore(SDL_sem * sem)
{
if (sem) {
if (sem->id) {
#if defined(_WIN32_WCE) && (_WIN32_WCE < 300)
CloseSynchHandle(sem->id);
#else
CloseHandle(sem->id);
#endif
sem->id = 0;
}
SDL_free(sem);
@ -103,11 +87,7 @@ SDL_SemWaitTimeout(SDL_sem * sem, Uint32 timeout)
} else {
dwMilliseconds = (DWORD) timeout;
}
#if defined(_WIN32_WCE) && (_WIN32_WCE < 300)
switch (WaitForSemaphoreCE(sem->id, dwMilliseconds)) {
#else
switch (WaitForSingleObject(sem->id, dwMilliseconds)) {
#endif
case WAIT_OBJECT_0:
InterlockedDecrement(&sem->count);
retval = 0;
@ -159,11 +139,7 @@ SDL_SemPost(SDL_sem * sem)
* is waiting for this semaphore.
*/
InterlockedIncrement(&sem->count);
#if defined(_WIN32_WCE) && (_WIN32_WCE < 300)
if (ReleaseSemaphoreCE(sem->id, 1, NULL) == FALSE) {
#else
if (ReleaseSemaphore(sem->id, 1, NULL) == FALSE) {
#endif
InterlockedDecrement(&sem->count); /* restore */
SDL_SetError("ReleaseSemaphore() failed");
return -1;