Add synchronization byte \xAC at the beginning of RGB burst

This commit is contained in:
Petr Baudis 2012-11-16 18:37:24 +01:00
parent 62602ef940
commit 35822a08c9
3 changed files with 11 additions and 2 deletions

View file

@ -298,6 +298,9 @@ void drawScreen(SDL_Surface* screen, int t, FILE* fp)
if(SDL_MUSTLOCK(screen) && SDL_LockSurface(screen) < 0) return;
if (fp)
fwrite("\xAC", 1, 1, fp);
for (i=0; i<BOXES; ++i) {
program(i, t, &r, &g, &b);
if (fp) {
@ -316,7 +319,8 @@ void drawScreen(SDL_Surface* screen, int t, FILE* fp)
if (SDL_MUSTLOCK(screen)) SDL_UnlockSurface(screen);
SDL_Flip(screen);
fflush(fp);
if (fp)
fflush(fp);
}