make the plugin API frambuffer agnostic

Change-Id: I5abdc231093054c517ff53b9a456997e440e3f6e
This commit is contained in:
Moshe Piekarski 2020-10-06 13:34:04 -05:00 committed by William Wilgus
parent 5d5f8169b5
commit 12f3ed1699
25 changed files with 92 additions and 93 deletions

View file

@ -742,9 +742,9 @@ static void spr_scan(void)
void lcd_begin(void)
{
#if defined(HAVE_LCD_MODES) && (HAVE_LCD_MODES & LCD_MODE_PAL256)
vdest=(unsigned char*)rb->lcd_framebuffer;
vdest=(unsigned char*)*rb->lcd_framebuffer;
#else
vdest=rb->lcd_framebuffer;
vdest=*rb->lcd_framebuffer;
#endif
#ifdef HAVE_LCD_COLOR
@ -975,9 +975,9 @@ void lcd_refreshline(void)
#if defined(HAVE_LCD_MODES) && (HAVE_LCD_MODES & LCD_MODE_PAL256)
if(options.scaling==3) {
rb->lcd_blit_pal256((unsigned char*)rb->lcd_framebuffer,(LCD_WIDTH-160)/2, (LCD_HEIGHT-144)/2, (LCD_WIDTH-160)/2, (LCD_HEIGHT-144)/2, 160, 144);
rb->lcd_blit_pal256((unsigned char*)*rb->lcd_framebuffer,(LCD_WIDTH-160)/2, (LCD_HEIGHT-144)/2, (LCD_WIDTH-160)/2, (LCD_HEIGHT-144)/2, 160, 144);
} else {
rb->lcd_blit_pal256((unsigned char*)rb->lcd_framebuffer,0,0,0,0,LCD_WIDTH,LCD_HEIGHT);
rb->lcd_blit_pal256((unsigned char*)*rb->lcd_framebuffer,0,0,0,0,LCD_WIDTH,LCD_HEIGHT);
}
#else
if(options.scaling==3) {

View file

@ -290,7 +290,7 @@ void vid_update(int scanline)
else if (fb.mode==2)
scanline-=8;
scanline_remapped = scanline / 16;
frameb = rb->lcd_framebuffer + scanline_remapped * LCD_WIDTH;
frameb = *rb->lcd_framebuffer + scanline_remapped * LCD_WIDTH;
while (cnt < 160) {
balance += LCD_WIDTH;
if (balance > 0)
@ -316,7 +316,7 @@ void vid_update(int scanline)
else if (fb.mode==2)
scanline-=8;
scanline_remapped = scanline / 4;
frameb = rb->lcd_framebuffer + scanline_remapped * LCD_WIDTH;
frameb = *rb->lcd_framebuffer + scanline_remapped * LCD_WIDTH;
while (cnt < 160) {
*(frameb++) = (scan.buf[0][cnt]&0x3) |
((scan.buf[1][cnt]&0x3)<<2) |