kolibrios-fun/contrib/sdk/sources/SDL-1.2.2/test/sdltest.c
CleverMouse 3cf7852e03 autobuild sdlquake
git-svn-id: svn://kolibrios.org@5131 a494cfbc-eb01-0410-851d-a64ba20cac60
2014-09-18 11:46:53 +00:00

29 lines
457 B
C

#include"SDL.h"
#include<menuet/os.h>
SDL_Surface * screen;
static int done=0;
void app_main(void)
{
SDL_Event event;
if(SDL_Init(SDL_INIT_VIDEO)<0) __menuet__sys_exit();
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;
}
}
}
}