comparison vdp.c @ 1897:59a83c21d9d2

Fix crash in 68K debugger from forced VDP frame update when framebuffer is not acquired
author Michael Pavone <pavone@retrodev.com>
date Thu, 09 Jan 2020 22:27:20 -0800
parents 55d034719345
children 789746b1a1b3
comparison
equal deleted inserted replaced
1896:c157a535ceeb 1897:59a83c21d9d2
2069 } 2069 }
2070 } 2070 }
2071 2071
2072 void vdp_force_update_framebuffer(vdp_context *context) 2072 void vdp_force_update_framebuffer(vdp_context *context)
2073 { 2073 {
2074 if (!context->fb) {
2075 return;
2076 }
2074 uint16_t lines_max = context->inactive_start + context->border_bot + context->border_top; 2077 uint16_t lines_max = context->inactive_start + context->border_bot + context->border_top;
2075 2078
2076 uint16_t to_fill = lines_max - context->output_lines; 2079 uint16_t to_fill = lines_max - context->output_lines;
2077 memset( 2080 memset(
2078 ((char *)context->fb) + context->output_pitch * context->output_lines, 2081 ((char *)context->fb) + context->output_pitch * context->output_lines,