Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Andrey A.
Browse files Browse the repository at this point in the history
I made a video driver GAPI/RAW for WinCE (SDL-1.3).
RAW mode has a priority, and also, GAPI mode works with environment
"SDL_VIDEO_RENDERER=gapi" and for RAW mode "SDL_VIDEO_RENDERER=raw".

I checked the work on the screens of VGA, WVGA, QVGA, WQVGA, HVGA,
 + tested all modes with WindowsMobile Emulator.

Also, correctly draws the pointer position and the scale of the pointer
for VGA/WVGA modes,
correctly draws top left position for DM orientation screen, and
portrait/landscape/square geometry the screen also correct.

Also, I added a small fix for GDI fullscreen mode.

Patch for latest revision SDL-1.3 in an attachment.
Also added small path for mingw32ce build.
  • Loading branch information
slouken committed Jul 28, 2010
1 parent 434904a commit 595584c
Show file tree
Hide file tree
Showing 16 changed files with 1,275 additions and 689 deletions.
22 changes: 19 additions & 3 deletions configure.in
Expand Up @@ -1917,7 +1917,7 @@ CheckWIN32()
AC_MSG_CHECKING(Windows CE)
have_wince=no
AC_TRY_COMPILE([
#ifndef _WIN32_WCE
#if !defined(_WIN32_WCE) && !defined(__MINGW32CE__)
#error This is not Windows CE
#endif
],[
Expand Down Expand Up @@ -2388,6 +2388,12 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
SOURCES="$SOURCES $srcdir/src/atomic/win32/*.c"
have_atomic=yes
fi
# Set up dummy files for the joystick for now
if test x$enable_joystick = xyes; then
AC_DEFINE(SDL_JOYSTICK_DUMMY)
SOURCES="$SOURCES $srcdir/src/joystick/dummy/*.c"
have_joystick=yes
fi
# Set up files for the thread library
if test x$enable_threads = xyes; then
AC_DEFINE(SDL_THREAD_WIN32)
Expand All @@ -2411,10 +2417,20 @@ AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
fi
# Set up the system libraries we need
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lcoredll -lcommctrl -lmmtimer"

# mingw32ce library
case "$host" in
*-mingw32ce)
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lmingwex"
;;
*)
;;
esac

# The Win32 platform requires special setup
SDLMAIN_SOURCES="$srcdir/src/main/win32/*.c"
SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main -D_WIN32_WCE=0x420"
SDL_LIBS="-lSDLmain $SDL_LIBS"
EXTRA_CFLAGS="$EXTRA_CFLAGS -Dmain=SDL_main -D_WIN32_WCE=0x420"
EXTRA_LDFLAGS="-lSDLmain $EXTRA_LDFLAGS"
;;
*-*-cygwin* | *-*-mingw32*)
ARCH=win32
Expand Down
3 changes: 0 additions & 3 deletions src/video/SDL_sysvideo.h
Expand Up @@ -387,9 +387,6 @@ extern VideoBootStrap PS3_bootstrap;
#if SDL_VIDEO_DRIVER_SVGALIB
extern VideoBootStrap SVGALIB_bootstrap;
#endif
#if SDL_VIDEO_DRIVER_GAPI
extern VideoBootStrap GAPI_bootstrap;
#endif
#if SDL_VIDEO_DRIVER_WIN32
extern VideoBootStrap WIN32_bootstrap;
#endif
Expand Down
3 changes: 0 additions & 3 deletions src/video/SDL_video.c
Expand Up @@ -67,9 +67,6 @@ static VideoBootStrap *bootstrap[] = {
#if SDL_VIDEO_DRIVER_SVGALIB
&SVGALIB_bootstrap,
#endif
#if SDL_VIDEO_DRIVER_GAPI
&GAPI_bootstrap,
#endif
#if SDL_VIDEO_DRIVER_WIN32
&WIN32_bootstrap,
#endif
Expand Down
2 changes: 2 additions & 0 deletions src/video/win32/SDL_ceddrawrender.c
Expand Up @@ -459,6 +459,8 @@ DDRAW_CreateRenderer(SDL_Window * window, Uint32 flags)
}
data->ddraw = videodata->ddraw;

videodata->render = RENDER_DDRAW;

renderer->DisplayModeChanged = DDRAW_DisplayModeChanged;
renderer->CreateTexture = DDRAW_CreateTexture;
renderer->QueryTexturePixels = DDRAW_QueryTexturePixels;
Expand Down
2 changes: 2 additions & 0 deletions src/video/win32/SDL_d3drender.c
Expand Up @@ -451,6 +451,8 @@ D3D_CreateRenderer(SDL_Window * window, Uint32 flags)
}
data->d3d = videodata->d3d;

videodata->render = RENDER_D3D;

renderer->DisplayModeChanged = D3D_DisplayModeChanged;
renderer->CreateTexture = D3D_CreateTexture;
renderer->QueryTexturePixels = D3D_QueryTexturePixels;
Expand Down

0 comments on commit 595584c

Please sign in to comment.