Move pthread_t declaration
parent
1ff14f7cbc
commit
970fb66db8
|
@ -51,7 +51,6 @@ int main(int argc, char **argv)
|
||||||
Player *player = playerCreate(DOWN, DEFX, DEFY, 0);
|
Player *player = playerCreate(DOWN, DEFX, DEFY, 0);
|
||||||
Screen *screen = screenCreate(SIZE, SIZE, ' ');
|
Screen *screen = screenCreate(SIZE, SIZE, ' ');
|
||||||
PlayerNode *node;
|
PlayerNode *node;
|
||||||
pthread_t input_thread;
|
|
||||||
int i;
|
int i;
|
||||||
int head_x, head_y;
|
int head_x, head_y;
|
||||||
Food food = generateFood(player);
|
Food food = generateFood(player);
|
||||||
|
@ -64,6 +63,7 @@ int main(int argc, char **argv)
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
_beginthread(input, 0, &input_args);
|
_beginthread(input, 0, &input_args);
|
||||||
#else
|
#else
|
||||||
|
pthread_t input_thread;
|
||||||
pthread_create(&input_thread, NULL, input, &input_args);
|
pthread_create(&input_thread, NULL, input, &input_args);
|
||||||
#endif
|
#endif
|
||||||
while (*running)
|
while (*running)
|
||||||
|
|
Loading…
Reference in New Issue