1
0
Fork 0
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:
Jonas 'Sortie' Termansen 2012-11-07 15:26:02 +01:00
parent 4f60d028ef
commit 7e05129023
3 changed files with 9 additions and 3 deletions

View file

@ -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()

View file

@ -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()

View file

@ -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()