Date: Mon, 11 Aug 2003 22:49:06 +0100
authorSam Lantinga <slouken@libsdl.org>
Mon, 11 Aug 2003 22:28:13 +0000
changeset 68791400ecf307d
parent 686 505086775d3c
child 688 c0522010bb6d
Date: Mon, 11 Aug 2003 22:49:06 +0100
From: Peter Naulls
Subject: RISC OS patches

This patch includes a patch to configure.in for RISC OS cross compiling
which was somehow missed from last time.

It also corrects BPP setting and checking behaviour.
configure.in
src/video/riscos/SDL_riscosvideo.c
     1.1 --- a/configure.in	Sun Aug 10 17:49:51 2003 +0000
     1.2 +++ b/configure.in	Mon Aug 11 22:28:13 2003 +0000
     1.3 @@ -2489,6 +2489,26 @@
     1.4          # MiNT does not define "unix"
     1.5          CFLAGS="$CFLAGS -Dunix"
     1.6          ;;
     1.7 +    *-*-riscos)
     1.8 +        ARCH=riscos
     1.9 +        JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS riscos"
    1.10 +        JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS riscos/libjoystick_riscos.la"
    1.11 +        COPY_ARCH_SRC(src/timer, riscos, SDL_systimer.c)
    1.12 +        COPY_ARCH_SRC(src/main, linux, SDL_main.c)
    1.13 +        VIDEO_SUBDIRS="$VIDEO_SUBDIRS riscos"
    1.14 +        VIDEO_DRIVERS="$VIDEO_DRIVERS riscos/libvideo_riscos.la"
    1.15 +        AUDIO_SUBDIRS="$AUDIO_SUBDIRS riscos"
    1.16 +        AUDIO_DRIVERS="$AUDIO_DRIVERS riscos/libaudio_riscos.la"
    1.17 +
    1.18 +        if test x$enable_cdrom = xyes; then
    1.19 +            CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
    1.20 +            CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
    1.21 +        fi
    1.22 +
    1.23 +        CFLAGS="$CFLAGS -DDISABLE_THREADS -DENABLE_RISCOS -DDRENDERER_SUPPORT"
    1.24 +
    1.25 +        SYSTEM_LIBS="$SYSTEM_LIBS -ljpeg -ltiff -lpng -lz"
    1.26 +        ;;
    1.27      *)
    1.28          AC_MSG_ERROR(Unsupported target:  Please add to configure.in)
    1.29          ;;
     2.1 --- a/src/video/riscos/SDL_riscosvideo.c	Sun Aug 10 17:49:51 2003 +0000
     2.2 +++ b/src/video/riscos/SDL_riscosvideo.c	Mon Aug 11 22:28:13 2003 +0000
     2.3 @@ -177,8 +177,8 @@
     2.4  	regs.r[0] = -1; /* Current mode */
     2.5  	regs.r[1] = 9;  /* Log base 2 bpp */
     2.6  
     2.7 -	_kernel_swi(OS_ReadVduVariables, &regs, &regs);
     2.8 -	vformat->BitsPerPixel = (1 << regs.r[0]);
     2.9 +	_kernel_swi(OS_ReadModeVariable, &regs, &regs);
    2.10 +	vformat->BitsPerPixel = (1 << regs.r[2]);
    2.11  
    2.12  	/* Minimum bpp for SDL is 8 */
    2.13  	if (vformat->BitsPerPixel < 8) vformat->BitsPerPixel = 8;
    2.14 @@ -191,7 +191,7 @@
    2.15  			vformat->Bmask = 0x00007c00;
    2.16  			vformat->Gmask = 0x000003e0;
    2.17  			vformat->Rmask = 0x0000001f;
    2.18 -			vformat->BitsPerPixel = 15; /* SDL wants actual number of bits used */
    2.19 +			vformat->BitsPerPixel = 16; /* SDL wants actual number of bits used */
    2.20  			vformat->BytesPerPixel = 2;
    2.21  			break;
    2.22