repo.or.cz
/
tennix.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Make Tennix buildable on the MacOSX platform (Tennix.app)
[tennix.git]
/
input.c
blob
980758d17a83656e6efcc0cdb2108118f0762e1b
1
#include
"tennix.h"
2
#include
"input.h"
3
4
void
wait_keypress
() {
5
SDL_Event e
;
6
unsigned char
done
=
0
;
7
8
SDL_Delay
(
100
);
9
10
/* clean up all events */
11
while
(
SDL_PollEvent
( &
e
));
12
13
while
( !
done
) {
14
if
(
SDL_PollEvent
( &
e
)) {
15
done
= (
e
.
type
==
SDL_KEYUP
||
e
.
type
==
SDL_MOUSEBUTTONUP
);
16
}
else
{
17
SDL_Delay
(
50
);
18
}
19
}
20
}
21