2006-04-12 01:59:08 +02:00
|
|
|
/**
|
|
|
|
* =========================================================================
|
|
|
|
* File : sdl.h
|
|
|
|
* Project : 0 A.D.
|
|
|
|
* Description : SDL header; uses emulator on Windows, otherwise libsdl.
|
|
|
|
* =========================================================================
|
|
|
|
*/
|
|
|
|
|
2007-05-07 18:33:24 +02:00
|
|
|
// license: GPL; see lib/license.txt
|
2006-04-12 01:59:08 +02:00
|
|
|
|
2007-05-07 18:33:24 +02:00
|
|
|
#ifndef INCLUDED_SDL
|
|
|
|
#define INCLUDED_SDL
|
2005-06-20 17:14:36 +02:00
|
|
|
|
2006-08-26 23:52:18 +02:00
|
|
|
#include "sdl_fwd.h"
|
2008-01-19 12:33:11 +01:00
|
|
|
#include "lib/config2.h" // CONFIG2_WSDL
|
2006-08-26 23:52:18 +02:00
|
|
|
|
2008-01-19 12:33:11 +01:00
|
|
|
#if OS_WIN && CONFIG2_WSDL
|
2006-06-02 04:10:27 +02:00
|
|
|
# include "lib/sysdep/win/wsdl.h"
|
2004-03-03 00:56:51 +01:00
|
|
|
#else
|
2005-10-24 02:06:08 +02:00
|
|
|
|
2004-05-06 19:14:30 +02:00
|
|
|
# include <SDL/SDL.h>
|
|
|
|
# include <SDL/SDL_thread.h>
|
2007-12-29 17:45:22 +01:00
|
|
|
|
|
|
|
// if the compiler doesn't support inlining, this header will pull
|
|
|
|
// in static bswap routines. doesn't matter - modern compilers
|
|
|
|
// will strip them if unused, and this is more convenient than
|
|
|
|
// another header that toggles between wsdl and SDL_endian.h.
|
2004-05-31 14:21:14 +02:00
|
|
|
# include <SDL/SDL_endian.h>
|
2007-12-29 17:45:22 +01:00
|
|
|
|
|
|
|
# if MSC_VERSION
|
|
|
|
# pragma comment(lib, "SDL")
|
|
|
|
# pragma comment(lib, "SDLmain")
|
|
|
|
# endif
|
2005-06-20 17:14:36 +02:00
|
|
|
|
2004-05-06 19:14:30 +02:00
|
|
|
#endif
|
2005-06-20 17:14:36 +02:00
|
|
|
|
2006-08-26 23:52:18 +02:00
|
|
|
// complete definition of our forward-declared SDL_Event (see sdl_fwd.h)
|
|
|
|
struct SDL_Event_
|
|
|
|
{
|
|
|
|
SDL_Event ev;
|
|
|
|
};
|
|
|
|
|
2007-05-07 18:33:24 +02:00
|
|
|
#endif // INCLUDED_SDL
|