4 * Copyright (C) 2005-2013 Team XBMC
7 * This Program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
12 * This Program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with XBMC; see the file COPYING. If not, see
19 * <http://www.gnu.org/licenses/>.
23 #if defined(HAVE_CONFIG_H) && !defined(TARGET_WINDOWS)
25 #define DECLARE_UNUSED(a,b) a __attribute__((unused)) b;
28 #define PRE_SKIN_VERSION_9_10_COMPATIBILITY 1
29 #define PRE_SKIN_VERSION_11_COMPATIBILITY 1
34 #define HAS_DVD_SWSCALE
36 #define HAS_EVENT_SERVER
38 #define HAS_SCREENSAVER
41 #define HAS_VIDEO_PLAYBACK
42 #define HAS_VISUALISATION
43 #define HAS_PVRCLIENTS
45 #ifdef HAVE_LIBMICROHTTPD
46 #define HAS_WEB_SERVER
47 #define HAS_WEB_INTERFACE
53 #define HAS_ASAP_CODEC
56 #define HAS_FILESYSTEM
57 #define HAS_FILESYSTEM_CDDA
58 #define HAS_FILESYSTEM_RTV
59 #define HAS_FILESYSTEM_DAAP
60 #define HAS_FILESYSTEM_SAP
61 #define HAS_FILESYSTEM_VTP
62 #define HAS_FILESYSTEM_HTSP
64 #ifdef HAVE_LIBSMBCLIENT
65 #define HAS_FILESYSTEM_SMB
69 #define HAS_FILESYSTEM_NFS
72 #ifdef HAVE_LIBAFPCLIENT
73 #define HAS_FILESYSTEM_AFP
80 #if defined(HAVE_LIBSHAIRPORT) || defined(HAVE_LIBSHAIRPLAY)
92 /**********************
94 **********************/
96 #if defined(TARGET_WINDOWS)
97 #define HAS_FILESYSTEM_RAR
99 #if defined(HAVE_XBMC_NONFREE)
100 #define HAS_FILESYSTEM_RAR
108 #if defined(TARGET_WINDOWS)
109 #define HAS_SDL_JOYSTICK
110 #define HAS_DVD_DRIVE
111 #define HAS_WIN32_NETWORK
112 #define HAS_IRSERVERSUITE
114 #define HAVE_LIBCRYSTALHD 2
115 #define HAS_WEB_SERVER
116 #define HAS_WEB_INTERFACE
119 #define HAVE_LIBBLURAY
120 #define HAS_ASAP_CODEC
121 #define HAVE_YAJL_YAJL_VERSION_H
122 #define HAS_FILESYSTEM_SMB
123 #define HAS_FILESYSTEM_NFS
127 #define HAVE_LIBSHAIRPLAY
129 #define HAVE_LIBMP3LAME
130 #define HAVE_LIBVORBISENC
134 #define DECLARE_UNUSED(a,b) a b;
141 #if defined(TARGET_DARWIN)
142 #if defined(TARGET_DARWIN_OSX)
145 #define HAS_SDL_OPENGL
146 #define HAS_SDL_WIN_EVENTS
149 #define HAS_LINUX_NETWORK
156 #if defined(TARGET_LINUX) || defined(TARGET_FREEBSD)
157 #if defined(HAVE_LIBAVAHI_COMMON) && defined(HAVE_LIBAVAHI_CLIENT)
170 #ifndef HAS_SDL_OPENGL
171 #define HAS_SDL_OPENGL
173 #define HAS_SDL_WIN_EVENTS
175 #define HAS_LINUX_EVENTS
177 #define HAS_LINUX_NETWORK
180 #define HAS_PULSEAUDIO
182 #ifdef HAVE_LIBXRANDR
191 #define HAS_FILESYSTEM_SFTP
198 #if defined(TARGET_DARWIN)
199 #include "../git_revision.h"
203 #define GIT_REV "Unknown"
206 /****************************************
207 * Additional platform specific includes
208 ****************************************/
210 #if defined(TARGET_WINDOWS)
212 #define DIRECTINPUT_VERSION 0x0800
213 #include "mmsystem.h"
216 #define DSSPEAKER_USE_DEFAULT DSSPEAKER_STEREO
217 #define LPDIRECTSOUND8 LPDIRECTSOUND
219 #include "PlatformInclude.h"
221 #include "D3D9.h" // On Win32, we're always using DirectX for something, whether it be the actual rendering
222 #include "D3DX9.h" // or the reference video clock.
224 #include <d3d9types.h>
231 #if defined(TARGET_POSIX)
233 #include <sys/time.h>
234 #include <sys/types.h>
236 #include "PlatformInclude.h"
239 #if defined(TARGET_ANDROID)
240 #undef HAS_LINUX_EVENTS
244 // EGL detected. Dont use GLX!
250 // GLES2.0 detected. Dont use GL!
251 #ifdef HAVE_LIBGLESV2
256 // GLES1.0 detected. Dont use GL!
263 #define HAS_CDDA_RIPPER
266 #define SAFE_DELETE(p) do { delete (p); (p)=NULL; } while (0)
267 #define SAFE_DELETE_ARRAY(p) do { delete[] (p); (p)=NULL; } while (0)
268 #define SAFE_RELEASE(p) do { if(p) { (p)->Release(); (p)=NULL; } } while (0)
270 // Useful pixel colour manipulation macros
271 #define GET_A(color) ((color >> 24) & 0xFF)
272 #define GET_R(color) ((color >> 16) & 0xFF)
273 #define GET_G(color) ((color >> 8) & 0xFF)
274 #define GET_B(color) ((color >> 0) & 0xFF)
279 #if defined(HAS_SKIN_TOUCHED) && defined(TARGET_DARWIN_IOS) && !defined(TARGET_DARWIN_IOS_ATV2)
280 #define DEFAULT_SKIN "skin.touched"
282 #define DEFAULT_SKIN "skin.confluence"