Skip to content
Permalink
Browse files

Updated Windows CE/PocketPC support...adds GAPI driver, landscape mode,

 updated project files, VS2005 support, VGA mode, more device support, etc,
 etc, etc.

Fixes Bugzilla #47 and #28.

--ryan.
  • Loading branch information
icculus committed Jan 19, 2006
1 parent ed77fd3 commit 86a3ff7f6e85b25e7cc6c455c0eb4083f63989fe
@@ -1,5 +1,24 @@

Project files for embedded Visual C++ 4.0 can be found in VisualCE.zip
Project files for embedded Visual C++ 3.0, 4.0 and
Visual Studio 2005 can be found in VisualCE.zip

SDL supports GAPI and WinDib output for Windows CE.

GAPI driver supports:

- all possible WinCE devices (Pocket PC, Smartphones, HPC)
with different orientations of video memory and resolutions.
- 4, 8 and 16 bpp devices
- special handling of 8bpp on 8bpp devices
- VGA mode, you can even switch between VGA and GAPI in runtime
(between 240x320 and 480x640 for example). On VGA devices you can
use either GAPI or VGA.
- Landscape mode and automatic rotation of buttons and stylus coordinates.
To enable landscape mode make width of video screen bigger than height.
For example:
SDL_SetVideoMode(320,240,16,SDL_FULLSCREEN)
- WM2005
- SDL_ListModes

NOTE:
There are several SDL features not available in the WinCE port of SDL.
BIN +14 KB (150%) VisualCE.zip
Binary file not shown.
@@ -3140,6 +3140,7 @@ src/video/vgl/Makefile
src/video/wincommon/Makefile
src/video/windib/Makefile
src/video/windx5/Makefile
src/video/gapi/Makefile
src/video/x11/Makefile
src/video/xbios/Makefile
src/video/XFree86/Makefile
@@ -30,7 +30,10 @@ static char rcsid =
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>

#ifndef _WIN32_WCE
#include <process.h>
#endif

#include "SDL_error.h"
#include "SDL_thread.h"
@@ -53,9 +56,14 @@ int SDL_SYS_CreateThread(SDL_Thread *thread, void *args)
* have to use _beginthreadex if we want the returned handle
* to be accessible after the thread exits
* threads created with _beginthread auto-close the handle
* Windows CE still use CreateThread.
*/
#ifdef _WIN32_WCE
thread->handle = CreateThread(NULL, 0, RunThread, args, 0, &threadid);
#else
thread->handle = (SYS_ThreadHandle) _beginthreadex(NULL, 0, RunThread,
args, 0, &threadid);
#endif
if (thread->handle == NULL) {
SDL_SetError("Not enough resources to create thread");
return(-1);
@@ -201,9 +201,9 @@ static SYNCHHANDLE CleanUp (SYNCHHANDLE hSynch, DWORD Flags)
BOOL ok = TRUE;

if (hSynch == NULL) return NULL;
if (Flags & 4 == 1 && hSynch->hEvent == NULL) ok = FALSE;
if (Flags & 2 == 1 && hSynch->hMutex == NULL) ok = FALSE;
if (Flags & 1 == 1 && hSynch->hEvent == NULL) ok = FALSE;
if ((Flags & 4) == 1 && (hSynch->hEvent == NULL)) ok = FALSE;
if ((Flags & 2) == 1 && (hSynch->hMutex == NULL)) ok = FALSE;
if ((Flags & 1) == 1 && (hSynch->hEvent == NULL)) ok = FALSE;
if (!ok)
{
CloseSynchHandle (hSynch);
@@ -9,7 +9,7 @@ DIST_SUBDIRS = dummy x11 dga nanox fbcon directfb vgl svga ggi aalib \
wincommon windib windx5 \
maccommon macdsp macrom riscos quartz \
bwindow ps2gs photon cybergfx epoc picogui \
ataricommon xbios gem dc qtopia XFree86 wscons \
ataricommon xbios gem dc qtopia XFree86 wscons gapi \
ipod os2fslib

DRIVERS = @VIDEO_DRIVERS@
@@ -39,6 +39,7 @@ static char rcsid =
#include "SDL_memops.h"
#include "SDL_leaks.h"


/* Public routines */
/*
* Create an empty RGB surface of the appropriate depth
@@ -365,6 +365,9 @@ extern VideoBootStrap SVGALIB_bootstrap;
#ifdef ENABLE_AALIB
extern VideoBootStrap AALIB_bootstrap;
#endif
#ifdef ENABLE_GAPI
extern VideoBootStrap GAPI_bootstrap;
#endif
#ifdef ENABLE_WINDIB
extern VideoBootStrap WINDIB_bootstrap;
#endif
@@ -87,6 +87,9 @@ static VideoBootStrap *bootstrap[] = {
#ifdef ENABLE_AALIB
&AALIB_bootstrap,
#endif
#ifdef ENABLE_GAPI
&GAPI_bootstrap,
#endif
#ifdef ENABLE_WINDIB
&WINDIB_bootstrap,
#endif
@@ -0,0 +1,6 @@
Makefile.in
Makefile
.libs
*.o
*.lo
*.la
@@ -0,0 +1,10 @@

## Makefile.am for SDL using the PocketPC GAPI video driver

noinst_LTLIBRARIES = libvideo_gapi.la
libvideo_gapi_la_SOURCES = $(GAPI_SRCS)

# The SDL GAPI driver sources
GAPI_SRCS = \
SDL_gapivideo.c \
SDL_gapivideo.h

0 comments on commit 86a3ff7

Please sign in to comment.