summaryrefslogtreecommitdiffstats
path: root/apps/plugins/doom/i_video.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/doom/i_video.c')
-rw-r--r--apps/plugins/doom/i_video.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/plugins/doom/i_video.c b/apps/plugins/doom/i_video.c
index 3186fac16d..99b4de827d 100644
--- a/apps/plugins/doom/i_video.c
+++ b/apps/plugins/doom/i_video.c
@@ -1052,6 +1052,12 @@ void I_FinishUpdate (void)
rb->lcd_blit_pal256(src, 0, 0, 0, 0, LCD_WIDTH, LCD_HEIGHT);
#endif
#elif defined(HAVE_LCD_COLOR)
+ static fb_data *lcd_fb = NULL;
+ if (!lcd_fb)
+ {
+ struct viewport *vp_main = *(rb->screens[SCREEN_MAIN]->current_viewport);
+ lcd_fb = vp_main->buffer->fb_ptr;
+ }
#if(LCD_HEIGHT>LCD_WIDTH)
if(rotate_screen)
{
@@ -1059,7 +1065,7 @@ void I_FinishUpdate (void)
for (y = 1; y <= SCREENHEIGHT; y++)
{
- fb_data *dst = *rb->lcd_framebuffer + LCD_WIDTH - y;
+ fb_data *dst = lcd_fb + LCD_WIDTH - y;
count = SCREENWIDTH;
do
@@ -1073,7 +1079,7 @@ void I_FinishUpdate (void)
else
#endif
{
- fb_data *dst = *rb->lcd_framebuffer;
+ fb_data *dst = lcd_fb;
count = SCREENWIDTH*SCREENHEIGHT;
do