The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
compat.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2014 - 2016 by Mark de Wever <[email protected]>
3  Part of the Battle for Wesnoth Project http://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
15 #ifndef SDL_COMPAT_HPP_INCLUDED
16 #define SDL_COMPAT_HPP_INCLUDED
17 
18 /**
19  * @file
20  * Compatibility layer for using SDL 1.2 and 2.0.
21  *
22  * Only has some minimal wrapping for the changes. The layer can be removed once
23  * we switch to SDL 2.0.
24  */
25 
26 #include <SDL_version.h>
27 
28 
29 #define SDLKey SDL_Keycode
30 #define SDLMod SDL_Keymod
31 #define SDL_keysym SDL_Keysym
32 #define SDL_GetKeyState SDL_GetKeyboardState
33 #define SDLK_LMETA SDLK_LGUI
34 #define SDLK_RMETA SDLK_RGUI
35 #define KMOD_LMETA KMOD_LGUI
36 #define KMOD_RMETA KMOD_RGUI
37 #define KMOD_META KMOD_GUI
38 #define SDL_FULLSCREEN SDL_WINDOW_FULLSCREEN_DESKTOP
39 #define SDL_EVENTMASK(EVENT) EVENT, EVENT
40 #define SDL_GetAppState CVideo::get_singleton().window_state
41 
42 
43 #endif