Mercurial > sdl-ios-xcode
comparison 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 |
comparison
equal
deleted
inserted
replaced
686:505086775d3c | 687:91400ecf307d |
---|---|
175 } | 175 } |
176 | 176 |
177 regs.r[0] = -1; /* Current mode */ | 177 regs.r[0] = -1; /* Current mode */ |
178 regs.r[1] = 9; /* Log base 2 bpp */ | 178 regs.r[1] = 9; /* Log base 2 bpp */ |
179 | 179 |
180 _kernel_swi(OS_ReadVduVariables, ®s, ®s); | 180 _kernel_swi(OS_ReadModeVariable, ®s, ®s); |
181 vformat->BitsPerPixel = (1 << regs.r[0]); | 181 vformat->BitsPerPixel = (1 << regs.r[2]); |
182 | 182 |
183 /* Minimum bpp for SDL is 8 */ | 183 /* Minimum bpp for SDL is 8 */ |
184 if (vformat->BitsPerPixel < 8) vformat->BitsPerPixel = 8; | 184 if (vformat->BitsPerPixel < 8) vformat->BitsPerPixel = 8; |
185 | 185 |
186 | 186 |
189 case 15: | 189 case 15: |
190 case 16: | 190 case 16: |
191 vformat->Bmask = 0x00007c00; | 191 vformat->Bmask = 0x00007c00; |
192 vformat->Gmask = 0x000003e0; | 192 vformat->Gmask = 0x000003e0; |
193 vformat->Rmask = 0x0000001f; | 193 vformat->Rmask = 0x0000001f; |
194 vformat->BitsPerPixel = 15; /* SDL wants actual number of bits used */ | 194 vformat->BitsPerPixel = 16; /* SDL wants actual number of bits used */ |
195 vformat->BytesPerPixel = 2; | 195 vformat->BytesPerPixel = 2; |
196 break; | 196 break; |
197 | 197 |
198 case 24: | 198 case 24: |
199 case 32: | 199 case 32: |