forked from KolibriOS/kolibrios
№2
git-svn-id: svn://kolibrios.org@8215 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
28
contrib/sdk/sources/SDL-1.2.2_newlib/test/sdltest.c
Executable file
28
contrib/sdk/sources/SDL-1.2.2_newlib/test/sdltest.c
Executable file
@@ -0,0 +1,28 @@
|
||||
#include "SDL.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
SDL_Surface* screen;
|
||||
static int done = 0;
|
||||
|
||||
int main()
|
||||
{
|
||||
SDL_Event event;
|
||||
if(SDL_Init(SDL_INIT_VIDEO) < 0) exit(0);
|
||||
atexit(SDL_Quit);
|
||||
screen = SDL_SetVideoMode(320, 200, 8, SDL_SWSURFACE);
|
||||
while(!done)
|
||||
{
|
||||
while(SDL_PollEvent(&event))
|
||||
{
|
||||
switch(event.type)
|
||||
{
|
||||
case SDL_KEYDOWN:
|
||||
case SDL_QUIT:
|
||||
done=1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user