diff src/video/riscos/SDL_riscosvideo.c @ 687:91400ecf307d

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.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 11 Aug 2003 22:28:13 +0000
parents 550bccdf04bd
children b8d311d90021
line wrap: on
line diff
--- a/src/video/riscos/SDL_riscosvideo.c	Sun Aug 10 17:49:51 2003 +0000
+++ b/src/video/riscos/SDL_riscosvideo.c	Mon Aug 11 22:28:13 2003 +0000
@@ -177,8 +177,8 @@
 	regs.r[0] = -1; /* Current mode */
 	regs.r[1] = 9;  /* Log base 2 bpp */
 
-	_kernel_swi(OS_ReadVduVariables, &regs, &regs);
-	vformat->BitsPerPixel = (1 << regs.r[0]);
+	_kernel_swi(OS_ReadModeVariable, &regs, &regs);
+	vformat->BitsPerPixel = (1 << regs.r[2]);
 
 	/* Minimum bpp for SDL is 8 */
 	if (vformat->BitsPerPixel < 8) vformat->BitsPerPixel = 8;
@@ -191,7 +191,7 @@
 			vformat->Bmask = 0x00007c00;
 			vformat->Gmask = 0x000003e0;
 			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;
 			break;