Change HAVE_LOCATION to HAVE_CORELOCATION

This commit is contained in:
Twinaphex 2015-04-20 11:41:33 +02:00
parent c62de6b3cf
commit 813a47d43c
10 changed files with 27 additions and 28 deletions

View File

@ -333,7 +333,7 @@
"-DHAVE_GRIFFIN",
"-DHAVE_CORETEXT",
"-DHAVE_IOHIDMANAGER",
"-DHAVE_LOCATION",
"-DHAVE_CORELOCATION",
"-DHAVE_RGUI",
"-DHAVE_MENU",
"-DOSX",
@ -389,7 +389,7 @@
OTHER_CFLAGS = (
"-DHAVE_GRIFFIN",
"-DHAVE_IOHIDMANAGER",
"-DHAVE_LOCATION",
"-DHAVE_CORELOCATION",
"-DHAVE_RGUI",
"-DHAVE_MENU",
"-DOSX",

View File

@ -185,13 +185,13 @@ void get_ios_version(int *major, int *minor);
#elif defined(HAVE_COCOA)
#include <AppKit/AppKit.h>
#ifdef HAVE_LOCATION
#ifdef HAVE_CORELOCATION
#include <CoreLocation/CoreLocation.h>
#endif
@interface RAGameView : NSView
#ifdef HAVE_LOCATION
#ifdef HAVE_CORELOCATION
<CLLocationManagerDelegate>
#endif

View File

@ -476,7 +476,7 @@ didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
}
#endif
#ifdef HAVE_LOCATION
#ifdef HAVE_CORELOCATION
#include <CoreLocation/CoreLocation.h>
static CLLocationManager *locationManager;
@ -634,7 +634,7 @@ camera_driver_t camera_apple = {
};
#endif
#ifdef HAVE_LOCATION
#ifdef HAVE_CORELOCATION
typedef struct apple_location
{
void *empty;
@ -708,14 +708,14 @@ fail:
return false;
}
location_driver_t location_apple = {
location_driver_t location_corelocation = {
apple_location_init,
apple_location_free,
apple_location_start,
apple_location_stop,
apple_location_get_position,
apple_location_set_interval,
"apple",
"corelocation",
};
#endif

View File

@ -23,7 +23,7 @@ ${APPLICATION_NAME}_FILES = $(SRC_DIR)/griffin/griffin.c \
$(SRC_DIR)/apple/common/RAGameView.m \
$(SRC_DIR)/apple/common/utility.m \
COMMON_FLAGS := -DIOS -DHAVE_GRIFFIN -DHAVE_LOCATION -DHAVE_NETPLAY -DHAVE_RGUI -DHAVE_MENU -DHAVE_DYNAMIC -DHAVE_OPENGL -DHAVE_FBO -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_GLSL -DINLINE=inline -DLSB_FIRST -DHAVE_THREADS -D__LIBRETRO__ -DRARCH_MOBILE -std=gnu99 -DHAVE_COREAUDIO -DHAVE_FBO -DHAVE_OVERLAY -DHAVE_ZLIB -DWANT_ZLIB -DSINC_LOWER_QUALITY -DRARCH_INTERNAL -DHAVE_FILTERS_BUILTIN -DHAVE_XMB -D_LZMA_UINT32_IS_ULONG -DHAVE_STRL
COMMON_FLAGS := -DIOS -DHAVE_GRIFFIN -DHAVE_CORELOCATION -DHAVE_NETPLAY -DHAVE_RGUI -DHAVE_MENU -DHAVE_DYNAMIC -DHAVE_OPENGL -DHAVE_FBO -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_GLSL -DINLINE=inline -DLSB_FIRST -DHAVE_THREADS -D__LIBRETRO__ -DRARCH_MOBILE -std=gnu99 -DHAVE_COREAUDIO -DHAVE_FBO -DHAVE_OVERLAY -DHAVE_ZLIB -DWANT_ZLIB -DSINC_LOWER_QUALITY -DRARCH_INTERNAL -DHAVE_FILTERS_BUILTIN -DHAVE_XMB -D_LZMA_UINT32_IS_ULONG -DHAVE_STRL
COMMON_FLAGS += -DHAVE_CAMERA
COMMON_IOS_FLAGS := -Wno-deprecated-declarations -Wno-error
COMMON_IOS_OBJCFLAGS := -fobjc-arc

View File

@ -501,7 +501,7 @@
"-DHAVE_CAMERA",
"-DHAVE_GRIFFIN",
"-DHAVE_CORETEXT",
"-DHAVE_LOCATION",
"-DHAVE_CORELOCATION",
"-DHAVE_RGUI",
"-DHAVE_MENU",
"-DHAVE_LIBRETRODB",
@ -565,7 +565,7 @@
"-DHAVE_NETWORKING",
"-DHAVE_CAMERA",
"-DHAVE_GRIFFIN",
"-DHAVE_LOCATION",
"-DHAVE_CORELOCATION",
"-DHAVE_RGUI",
"-DHAVE_MENU",
"-DHAVE_LIBRETRODB",
@ -602,7 +602,7 @@
"-DHAVE_NETWORKING",
"-DHAVE_CAMERA",
"-DHAVE_GRIFFIN",
"-DHAVE_LOCATION",
"-DHAVE_CORELOCATION",
"-DHAVE_RGUI",
"-DHAVE_MENU",
"-DHAVE_LIBRETRODB",
@ -670,7 +670,7 @@
"-DHAVE_NETWORKING",
"-DHAVE_CAMERA",
"-DHAVE_GRIFFIN",
"-DHAVE_LOCATION",
"-DHAVE_CORELOCATION",
"-DHAVE_RGUI",
"-DHAVE_MENU",
"-DHAVE_LIBRETRODB",
@ -729,7 +729,7 @@
"-DHAVE_NETWORKING",
"-DHAVE_CAMERA",
"-DHAVE_GRIFFIN",
"-DHAVE_LOCATION",
"-DHAVE_CORELOCATION",
"-DHAVE_RGUI",
"-DHAVE_MENU",
"-DHAVE_LIBRETRODB",
@ -790,7 +790,7 @@
"-DHAVE_NETWORKING",
"-DHAVE_CAMERA",
"-DHAVE_GRIFFIN",
"-DHAVE_LOCATION",
"-DHAVE_CORELOCATION",
"-DHAVE_RGUI",
"-DHAVE_MENU",
"-DHAVE_LIBRETRODB",
@ -856,7 +856,7 @@
"-DHAVE_NETWORKING",
"-DHAVE_CAMERA",
"-DHAVE_GRIFFIN",
"-DHAVE_LOCATION",
"-DHAVE_CORELOCATION",
"-DHAVE_RGUI",
"-DHAVE_MENU",
"-DHAVE_LIBRETRODB",
@ -895,7 +895,7 @@
"-DHAVE_NETWORKING",
"-DHAVE_CAMERA",
"-DHAVE_GRIFFIN",
"-DHAVE_LOCATION",
"-DHAVE_CORELOCATION",
"-DHAVE_RGUI",
"-DHAVE_MENU",
"-DHAVE_LIBRETRODB",

View File

@ -115,7 +115,7 @@ enum
CAMERA_NULL,
LOCATION_ANDROID,
LOCATION_APPLE,
LOCATION_CORELOCATION,
LOCATION_NULL,
OSK_PS3,
@ -301,8 +301,8 @@ enum
#if defined(ANDROID)
#define LOCATION_DEFAULT_DRIVER LOCATION_ANDROID
#elif defined(IOS) || defined(OSX)
#define LOCATION_DEFAULT_DRIVER LOCATION_APPLE
#elif defined(HAVE_CORELOCATION)
#define LOCATION_DEFAULT_DRIVER LOCATION_CORELOCATION
#else
#define LOCATION_DEFAULT_DRIVER LOCATION_NULL
#endif

View File

@ -381,8 +381,8 @@ const char *config_get_default_location(void)
{
case LOCATION_ANDROID:
return "android";
case LOCATION_APPLE:
return "apple";
case LOCATION_CORELOCATION:
return "corelocation";
default:
break;
}

View File

@ -25,10 +25,8 @@ static const location_driver_t *location_drivers[] = {
#ifdef ANDROID
&location_android,
#endif
#if defined(IOS) || defined(OSX)
#ifdef HAVE_LOCATION
&location_apple,
#endif
#ifdef HAVE_CORELOCATION
&location_corelocation,
#endif
&location_null,
NULL,

View File

@ -40,7 +40,7 @@ typedef struct location_driver
const char *ident;
} location_driver_t;
extern location_driver_t location_apple;
extern location_driver_t location_corelocation;
extern location_driver_t location_android;
extern location_driver_t location_null;

View File

@ -205,6 +205,7 @@ check_lib CORETEXT "-framework CoreText" CTFontCreateWithName
check_lib COCOA "-framework AppKit" NSApplicationMain
check_lib AVFOUNDATION "-framework AVFoundation"
check_lib CORELOCATION "-framework CoreLocation"
fi
check_pkgconf SDL sdl 1.2.10
@ -378,6 +379,6 @@ add_define_make OS "$OS"
# Creates config.mk and config.h.
add_define_make GLOBAL_CONFIG_DIR "$GLOBAL_CONFIG_DIR"
VARS="RGUI LAKKA GLUI XMB ALSA OSS OSS_BSD OSS_LIB AL RSOUND ROAR JACK COREAUDIO CORETEXT PULSE SDL SDL2 D3D9 DINPUT LIBUSB XINPUT DSOUND XAUDIO OPENGL EXYNOS DISPMANX SUNXI OMAP GLES GLES3 VG EGL KMS GBM DRM DYLIB GETOPT_LONG THREADS CG LIBXML2 ZLIB DYNAMIC FFMPEG AVCODEC AVFORMAT AVUTIL SWSCALE FREETYPE XKBCOMMON XVIDEO X11 XEXT XF86VM XINERAMA WAYLAND MALI_FBDEV VIVANTE_FBDEV NETWORKING NETPLAY NETWORK_CMD STDIN_CMD COMMAND SOCKET_LEGACY FBO STRL STRCASESTR MMAP PYTHON FFMPEG_ALLOC_CONTEXT3 FFMPEG_AVCODEC_OPEN2 FFMPEG_AVIO_OPEN FFMPEG_AVFORMAT_WRITE_HEADER FFMPEG_AVFORMAT_NEW_STREAM FFMPEG_AVCODEC_ENCODE_AUDIO2 FFMPEG_AVCODEC_ENCODE_VIDEO2 BSV_MOVIE VIDEOCORE NEON FLOATHARD FLOATSOFTFP UDEV V4L2 AV_CHANNEL_LAYOUT 7ZIP PARPORT COCOA AVFOUNDATION"
VARS="RGUI LAKKA GLUI XMB ALSA OSS OSS_BSD OSS_LIB AL RSOUND ROAR JACK COREAUDIO CORETEXT PULSE SDL SDL2 D3D9 DINPUT LIBUSB XINPUT DSOUND XAUDIO OPENGL EXYNOS DISPMANX SUNXI OMAP GLES GLES3 VG EGL KMS GBM DRM DYLIB GETOPT_LONG THREADS CG LIBXML2 ZLIB DYNAMIC FFMPEG AVCODEC AVFORMAT AVUTIL SWSCALE FREETYPE XKBCOMMON XVIDEO X11 XEXT XF86VM XINERAMA WAYLAND MALI_FBDEV VIVANTE_FBDEV NETWORKING NETPLAY NETWORK_CMD STDIN_CMD COMMAND SOCKET_LEGACY FBO STRL STRCASESTR MMAP PYTHON FFMPEG_ALLOC_CONTEXT3 FFMPEG_AVCODEC_OPEN2 FFMPEG_AVIO_OPEN FFMPEG_AVFORMAT_WRITE_HEADER FFMPEG_AVFORMAT_NEW_STREAM FFMPEG_AVCODEC_ENCODE_AUDIO2 FFMPEG_AVCODEC_ENCODE_VIDEO2 BSV_MOVIE VIDEOCORE NEON FLOATHARD FLOATSOFTFP UDEV V4L2 AV_CHANNEL_LAYOUT 7ZIP PARPORT COCOA AVFOUNDATION CORELOCATION"
create_config_make config.mk $VARS
create_config_header config.h $VARS