Add 'Press any key to start...' introductory message
This commit is contained in:
parent
d96d7485e5
commit
4efe0c2365
13
src/main.c
13
src/main.c
@ -14,6 +14,19 @@ int main (int argc, char* args[])
|
||||
}
|
||||
|
||||
p = Pong_init();
|
||||
Pong_render(p);
|
||||
|
||||
int start = false;
|
||||
while (!start) {
|
||||
printf("Press any key to start...\r");
|
||||
fflush(stdout);
|
||||
while( SDL_PollEvent( &(p->e) ) != 0 )
|
||||
{
|
||||
if( p->e.type == SDL_KEYDOWN) start = true;
|
||||
}
|
||||
}
|
||||
putc('\n', stdout);
|
||||
|
||||
Pong_run(p);
|
||||
Pong_free(p);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user