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 #if defined(HAVE_LIBMDNSEMBEDDED)
95 #define HAS_MDNS_EMBEDDED
98 /**********************
100 **********************/
102 #if defined(TARGET_WINDOWS)
103 #define HAS_FILESYSTEM_RAR
105 #if defined(HAVE_XBMC_NONFREE)
106 #define HAS_FILESYSTEM_RAR
114 #if defined(TARGET_WINDOWS)
115 #define HAS_SDL_JOYSTICK
116 #define HAS_DVD_DRIVE
117 #define HAS_WIN32_NETWORK
118 #define HAS_IRSERVERSUITE
120 #define HAVE_LIBCRYSTALHD 2
121 #define HAS_WEB_SERVER
122 #define HAS_WEB_INTERFACE
125 #define HAVE_LIBBLURAY
126 #define HAS_ASAP_CODEC
127 #define HAVE_YAJL_YAJL_VERSION_H
128 #define HAS_FILESYSTEM_SMB
129 #define HAS_FILESYSTEM_NFS
134 #define HAVE_LIBSHAIRPLAY
136 #define HAVE_LIBMP3LAME
137 #define HAVE_LIBVORBISENC
141 #define DECLARE_UNUSED(a,b) a b;
148 #if defined(TARGET_DARWIN)
149 #if defined(TARGET_DARWIN_OSX)
152 #define HAS_SDL_OPENGL
153 #define HAS_SDL_WIN_EVENTS
156 #define HAS_LINUX_NETWORK
163 #if defined(TARGET_LINUX) || defined(TARGET_FREEBSD)
164 #if defined(HAVE_LIBAVAHI_COMMON) && defined(HAVE_LIBAVAHI_CLIENT)
177 #ifndef HAS_SDL_OPENGL
178 #define HAS_SDL_OPENGL
180 #define HAS_SDL_WIN_EVENTS
182 #define HAS_LINUX_EVENTS
184 #define HAS_LINUX_NETWORK
187 #define HAS_PULSEAUDIO
189 #ifdef HAVE_LIBXRANDR
198 #define HAS_FILESYSTEM_SFTP
201 /****************************************
202 * Additional platform specific includes
203 ****************************************/
205 #if defined(TARGET_WINDOWS)
207 #define DIRECTINPUT_VERSION 0x0800
208 #include "mmsystem.h"
211 #define DSSPEAKER_USE_DEFAULT DSSPEAKER_STEREO
212 #define LPDIRECTSOUND8 LPDIRECTSOUND
214 #include "PlatformInclude.h"
216 #include "D3D9.h" // On Win32, we're always using DirectX for something, whether it be the actual rendering
217 #include "D3DX9.h" // or the reference video clock.
219 #include <d3d9types.h>
226 #if defined(TARGET_POSIX)
228 #include <sys/time.h>
229 #include <sys/types.h>
231 #include "PlatformInclude.h"
234 #if defined(TARGET_ANDROID)
235 #undef HAS_LINUX_EVENTS
239 // EGL detected. Dont use GLX!
245 // GLES2.0 detected. Dont use GL!
246 #ifdef HAVE_LIBGLESV2
251 // GLES1.0 detected. Dont use GL!
258 #define HAS_CDDA_RIPPER
261 #define SAFE_DELETE(p) do { delete (p); (p)=NULL; } while (0)
262 #define SAFE_DELETE_ARRAY(p) do { delete[] (p); (p)=NULL; } while (0)
263 #define SAFE_RELEASE(p) do { if(p) { (p)->Release(); (p)=NULL; } } while (0)
265 // Useful pixel colour manipulation macros
266 #define GET_A(color) ((color >> 24) & 0xFF)
267 #define GET_R(color) ((color >> 16) & 0xFF)
268 #define GET_G(color) ((color >> 8) & 0xFF)
269 #define GET_B(color) ((color >> 0) & 0xFF)
274 #if defined(HAS_SKIN_TOUCHED) && defined(TARGET_DARWIN_IOS) && !defined(TARGET_DARWIN_IOS_ATV2)
275 #define DEFAULT_SKIN "skin.touched"
277 #define DEFAULT_SKIN "skin.confluence"