mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Seek to 0 before writing to /dev/vga.
This commit is contained in:
parent
4f60d028ef
commit
7e05129023
3 changed files with 9 additions and 3 deletions
|
@ -57,7 +57,9 @@ void Clear()
|
||||||
|
|
||||||
bool FlushVGA()
|
bool FlushVGA()
|
||||||
{
|
{
|
||||||
return writeall(vgafd, frame, sizeof(frame)) < sizeof(frame);
|
if ( lseek(vgafd, 0, SEEK_SET) < 0)
|
||||||
|
return false;
|
||||||
|
return writeall(vgafd, frame, sizeof(frame)) == sizeof(frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
int Init()
|
int Init()
|
||||||
|
|
|
@ -70,7 +70,9 @@ unsigned soundleft;
|
||||||
|
|
||||||
bool FlushVGA()
|
bool FlushVGA()
|
||||||
{
|
{
|
||||||
return writeall(vgafd, frame, sizeof(frame)) < sizeof(frame);
|
if ( lseek(vgafd, 0, SEEK_SET) < 0)
|
||||||
|
return false;
|
||||||
|
return writeall(vgafd, frame, sizeof(frame)) == sizeof(frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
int Init()
|
int Init()
|
||||||
|
|
|
@ -95,7 +95,9 @@ void Reset()
|
||||||
|
|
||||||
bool FlushVGA()
|
bool FlushVGA()
|
||||||
{
|
{
|
||||||
return writeall(vgafd, frame, sizeof(frame)) < sizeof(frame);
|
if ( lseek(vgafd, 0, SEEK_SET) < 0)
|
||||||
|
return false;
|
||||||
|
return writeall(vgafd, frame, sizeof(frame)) == sizeof(frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
int Init()
|
int Init()
|
||||||
|
|
Loading…
Reference in a new issue