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
initial import of tennix SDL port
[tennix.git]
/
input.c
blob
4f5b887a7865122e2a5ff5474125046ff7916454
1
#include <SDL/SDL.h>
2
3
#include
"input.h"
4
5
void
wait_keypress
() {
6
SDL_Event e
;
7
unsigned char
done
=
0
;
8
9
SDL_Delay
(
100
);
10
11
/* clean up all events */
12
while
(
SDL_PollEvent
( &
e
));
13
14
while
( !
done
) {
15
if
(
SDL_PollEvent
( &
e
)) {
16
done
= (
e
.
type
==
SDL_KEYUP
||
e
.
type
==
SDL_MOUSEBUTTONUP
);
17
}
18
}
19
}
20