mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-08 04:56:43 +00:00
emulation: memlcd: reduce dirty bit count to 2 bytes
Previously, the memlcd had 22 bytes of dirty bits following a line. This was reduced to 2 bytes, but the logic checking the dirty bytes had not been updated. Reduce the dirty byte count to 2 bytes. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
11f726223b
commit
96d241acfd
1 changed files with 5 additions and 2 deletions
|
|
@ -121,19 +121,22 @@ namespace Antmicro.Renode.Peripherals.Video
|
|||
|
||||
protected override void Repaint()
|
||||
{
|
||||
var newbuf = new Byte[44 * Height];
|
||||
for (int y = 0; y < Height; y++)
|
||||
{
|
||||
// We should redraw the line if:
|
||||
// 1) The `updateDirty` bit is set and the current line is dirty, or
|
||||
// 2) The `updateAll` bit is set.
|
||||
bool shouldRedrawLine = updateAll;
|
||||
foreach (int i in Enumerable.Range(41, 22))
|
||||
foreach (int i in Enumerable.Range(41, 2))
|
||||
{
|
||||
if (shouldRedrawLine)
|
||||
{
|
||||
break;
|
||||
}
|
||||
// A line is considered "dirty" if any bit following the pixel data is
|
||||
// nonzero. Because each line is 336 pixels wide (which yields 42 bytes
|
||||
// of data per line), the remaining 2 bytes indicate whether the line
|
||||
// is dirty or not.
|
||||
if (updateDirty && (this.videoRam.data[y * 44 + i] != 0))
|
||||
{
|
||||
shouldRedrawLine = true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue