mirror of
https://github.com/brmlab/ledbar.git
synced 2025-06-10 05:44:01 +02:00
Add synchronization byte \xAC at the beginning of RGB burst
This commit is contained in:
parent
62602ef940
commit
35822a08c9
3 changed files with 11 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue