Skip to content

Commit

Permalink
Updated Windows CE/PocketPC support...adds GAPI driver, landscape mode,
Browse files Browse the repository at this point in the history
 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 86a3ff7
Show file tree
Hide file tree
Showing 19 changed files with 1,457 additions and 10 deletions.
21 changes: 20 additions & 1 deletion README.WinCE
@@ -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.
Expand Down
Binary file modified VisualCE.zip
Binary file not shown.
1 change: 1 addition & 0 deletions configure.in
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions src/thread/win32/SDL_systhread.c
Expand Up @@ -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"
Expand All @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions src/thread/win32/win_ce_semaphore.c
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/video/Makefile.am
Expand Up @@ -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@
Expand Down
1 change: 1 addition & 0 deletions src/video/SDL_surface.c
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions src/video/SDL_sysvideo.h
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions src/video/SDL_video.c
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions src/video/gapi/.cvsignore
@@ -0,0 +1,6 @@
Makefile.in
Makefile
.libs
*.o
*.lo
*.la
10 changes: 10 additions & 0 deletions src/video/gapi/Makefile.am
@@ -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.