diff --git a/host/ledbar.c b/host/ledbar.c index c8acaf1..0767460 100644 --- a/host/ledbar.c +++ b/host/ledbar.c @@ -286,14 +286,13 @@ int main(int argc, char* argv[]) } if (fp) { - struct termios t; - tcgetattr(fileno(fp), &t); - cfsetspeed(&t, B38400); - tcsetattr(fileno(fp), TCSADRAIN, &t); + struct termios t; + tcgetattr(fileno(fp), &t); + cfsetspeed(&t, B38400); + tcsetattr(fileno(fp), TCSADRAIN, &t); + sleep(2); } - sleep(2); - if (SDL_Init(SDL_INIT_VIDEO) < 0) return 1; if (!(screen = SDL_SetVideoMode(RESX, RESY, BPP, SDL_HWSURFACE))) { SDL_Quit();