Commit 05e09aef authored by Sam Lantinga's avatar Sam Lantinga

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.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40688
parent 1ced8d4d
...@@ -2489,6 +2489,26 @@ case "$target" in ...@@ -2489,6 +2489,26 @@ case "$target" in
# MiNT does not define "unix" # MiNT does not define "unix"
CFLAGS="$CFLAGS -Dunix" CFLAGS="$CFLAGS -Dunix"
;; ;;
*-*-riscos)
ARCH=riscos
JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS riscos"
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS riscos/libjoystick_riscos.la"
COPY_ARCH_SRC(src/timer, riscos, SDL_systimer.c)
COPY_ARCH_SRC(src/main, linux, SDL_main.c)
VIDEO_SUBDIRS="$VIDEO_SUBDIRS riscos"
VIDEO_DRIVERS="$VIDEO_DRIVERS riscos/libvideo_riscos.la"
AUDIO_SUBDIRS="$AUDIO_SUBDIRS riscos"
AUDIO_DRIVERS="$AUDIO_DRIVERS riscos/libaudio_riscos.la"
if test x$enable_cdrom = xyes; then
CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
fi
CFLAGS="$CFLAGS -DDISABLE_THREADS -DENABLE_RISCOS -DDRENDERER_SUPPORT"
SYSTEM_LIBS="$SYSTEM_LIBS -ljpeg -ltiff -lpng -lz"
;;
*) *)
AC_MSG_ERROR(Unsupported target: Please add to configure.in) AC_MSG_ERROR(Unsupported target: Please add to configure.in)
;; ;;
......
...@@ -177,8 +177,8 @@ int RISCOS_VideoInit(_THIS, SDL_PixelFormat *vformat) ...@@ -177,8 +177,8 @@ int RISCOS_VideoInit(_THIS, SDL_PixelFormat *vformat)
regs.r[0] = -1; /* Current mode */ regs.r[0] = -1; /* Current mode */
regs.r[1] = 9; /* Log base 2 bpp */ regs.r[1] = 9; /* Log base 2 bpp */
_kernel_swi(OS_ReadVduVariables, &regs, &regs); _kernel_swi(OS_ReadModeVariable, &regs, &regs);
vformat->BitsPerPixel = (1 << regs.r[0]); vformat->BitsPerPixel = (1 << regs.r[2]);
/* Minimum bpp for SDL is 8 */ /* Minimum bpp for SDL is 8 */
if (vformat->BitsPerPixel < 8) vformat->BitsPerPixel = 8; if (vformat->BitsPerPixel < 8) vformat->BitsPerPixel = 8;
...@@ -191,7 +191,7 @@ int RISCOS_VideoInit(_THIS, SDL_PixelFormat *vformat) ...@@ -191,7 +191,7 @@ int RISCOS_VideoInit(_THIS, SDL_PixelFormat *vformat)
vformat->Bmask = 0x00007c00; vformat->Bmask = 0x00007c00;
vformat->Gmask = 0x000003e0; vformat->Gmask = 0x000003e0;
vformat->Rmask = 0x0000001f; vformat->Rmask = 0x0000001f;
vformat->BitsPerPixel = 15; /* SDL wants actual number of bits used */ vformat->BitsPerPixel = 16; /* SDL wants actual number of bits used */
vformat->BytesPerPixel = 2; vformat->BytesPerPixel = 2;
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment