Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5131 | clevermous | 1 | #include"SDL.h" |
2 | #include |
||
3 | |||
4 | SDL_Surface * screen; |
||
5 | static int done=0; |
||
6 | |||
7 | void app_main(void) |
||
8 | { |
||
9 | SDL_Event event; |
||
10 | if(SDL_Init(SDL_INIT_VIDEO)<0) __menuet__sys_exit(); |
||
11 | atexit(SDL_Quit); |
||
12 | screen=SDL_SetVideoMode(320,200,8,SDL_SWSURFACE); |
||
13 | while(!done) |
||
14 | { |
||
15 | while(SDL_PollEvent(&event)) |
||
16 | { |
||
17 | switch(event.type) |
||
18 | { |
||
19 | case SDL_KEYDOWN: |
||
20 | case SDL_QUIT: |
||
21 | done=1; |
||
22 | break; |
||
23 | default: |
||
24 | break; |
||
25 | } |
||
26 | } |
||
27 | } |
||
28 | }0)> |