comparison vdp.c @ 1385:1eded4f19910

Prevent emulated screen from "rolling" when the vertical resolution is changed at an inopportune time
author Michael Pavone <pavone@retrodev.com>
date Wed, 31 May 2017 21:10:49 -0700
parents 9a5352a2f57a
children b56c8c51ca5d
comparison
equal deleted inserted replaced
1384:1df16f5985f3 1385:1eded4f19910
1736 output_line++; 1736 output_line++;
1737 } 1737 }
1738 if (output_line < context->inactive_start + context->border_bot && context->output_lines > 0) { 1738 if (output_line < context->inactive_start + context->border_bot && context->output_lines > 0) {
1739 output_line = context->output_lines++;//context->border_top + context->vcounter; 1739 output_line = context->output_lines++;//context->border_top + context->vcounter;
1740 } else if (output_line >= 0x200 - context->border_top) { 1740 } else if (output_line >= 0x200 - context->border_top) {
1741 if (output_line == 0x200 - context->border_top) {
1742 //We're at the top of the display, force context->output_lines to be zero to avoid
1743 //potential screen rolling if the mode is changed at an inopportune time
1744 context->output_lines = 0;
1745 }
1741 output_line = context->output_lines++;//context->vcounter - (0x200 - context->border_top); 1746 output_line = context->output_lines++;//context->vcounter - (0x200 - context->border_top);
1742 } else { 1747 } else {
1743 output_line = INVALID_LINE; 1748 output_line = INVALID_LINE;
1744 } 1749 }
1745 context->output = (uint32_t *)(((char *)context->fb) + context->output_pitch * output_line); 1750 context->output = (uint32_t *)(((char *)context->fb) + context->output_pitch * output_line);