Sleep at the beginning to give time for Arduino to settle

This commit is contained in:
Petr Baudis 2011-09-20 20:36:13 +02:00
parent 9d81a9d0e7
commit 9678a078b1

View file

@ -24,6 +24,7 @@
#include <math.h>
#include <time.h>
#include <SDL.h>
#include <unistd.h>
#define min(x,y) ( (x)<(y) ? (x) : (y) )
#define max(x,y) ( (x)>(y) ? (x) : (y) )
@ -283,6 +284,8 @@ int main(int argc, char* argv[])
return 1;
}
sleep(2);
if (SDL_Init(SDL_INIT_VIDEO) < 0) return 1;
if (!(screen = SDL_SetVideoMode(RESX, RESY, BPP, SDL_HWSURFACE))) {
SDL_Quit();