comparison src/video/riscos/SDL_riscosFullScreenVideo.c @ 1208:d90b362628ea

From: "alan buckley" <alan_baa@hotmail.com> Subject: Patch for RISC OS cursor palette handling in SDL Date: Mon, 07 Nov 2005 09:14:15 -0800 The mouse cursor palette was not correctly restored on RISC OS if the system was using anything but the default mouse colours. Additionally I've modifed the order the wait for vsync is called as it should be after the screen bank switching.
author Sam Lantinga <slouken@libsdl.org>
date Fri, 23 Dec 2005 09:40:15 +0000
parents 974ba6ae0fa3
children c9b51268668f
comparison
equal deleted inserted replaced
1207:c9ec00d3e8bc 1208:d90b362628ea
278 break; 278 break;
279 } 279 }
280 } else 280 } else
281 this->UpdateRects = FULLSCREEN_UpdateRects; /* Default do nothing implementation */ 281 this->UpdateRects = FULLSCREEN_UpdateRects; /* Default do nothing implementation */
282 282
283 if (this->SetColors == FULLSCREEN_SetColors) return; /* Already set up */
284
285 this->SetColors = FULLSCREEN_SetColors; 283 this->SetColors = FULLSCREEN_SetColors;
286 284
287 this->FlipHWSurface = FULLSCREEN_FlipHWSurface; 285 this->FlipHWSurface = FULLSCREEN_FlipHWSurface;
288 286
289 this->SetCaption = FULLSCREEN_SetWMCaption; 287 this->SetCaption = FULLSCREEN_SetWMCaption;
366 364
367 static int FULLSCREEN_FlipHWSurface(_THIS, SDL_Surface *surface) 365 static int FULLSCREEN_FlipHWSurface(_THIS, SDL_Surface *surface)
368 { 366 {
369 _kernel_swi_regs regs; 367 _kernel_swi_regs regs;
370 regs.r[0] = 19; 368 regs.r[0] = 19;
371 /* Wait for Vsync */
372 _kernel_swi(OS_Byte, &regs, &regs);
373 369
374 FULLSCREEN_SetDisplayBank(this->hidden->current_bank); 370 FULLSCREEN_SetDisplayBank(this->hidden->current_bank);
375 this->hidden->current_bank ^= 1; 371 this->hidden->current_bank ^= 1;
376 FULLSCREEN_SetWriteBank(this->hidden->current_bank); 372 FULLSCREEN_SetWriteBank(this->hidden->current_bank);
377 surface->pixels = this->hidden->bank[this->hidden->current_bank]; 373 surface->pixels = this->hidden->bank[this->hidden->current_bank];
374
375 /* Wait for Vsync */
376 _kernel_swi(OS_Byte, &regs, &regs);
378 377
379 return(0); 378 return(0);
380 } 379 }
381 380
382 /* Nothing to do if we are writing direct to hardware */ 381 /* Nothing to do if we are writing direct to hardware */