mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 08:30:16 +00:00
(Android) Add -DHAVE_LOCATION
This commit is contained in:
parent
9ed2c1b9b6
commit
d974216890
@ -47,7 +47,7 @@ ifeq ($(PERF_TEST), 1)
|
||||
LOCAL_CFLAGS += -DPERF_TEST
|
||||
endif
|
||||
|
||||
LOCAL_CFLAGS += -Wall -pthread -Wno-unused-function -O3 -fno-stack-protector -funroll-loops -DNDEBUG -DRARCH_MOBILE -DHAVE_GRIFFIN -DANDROID -DHAVE_DYNAMIC -DHAVE_OPENGL -DHAVE_FBO -DHAVE_OVERLAY -DHAVE_OPENGLES -DHAVE_VID_CONTEXT -DHAVE_OPENGLES2 -DGLSL_DEBUG -DHAVE_GLSL -DHAVE_MENU -DHAVE_RGUI -DHAVE_SCREENSHOTS -DWANT_MINIZ -DHAVE_ZLIB -DINLINE=inline -DLSB_FIRST -DHAVE_THREADS -D__LIBRETRO__ -I../../../deps/miniz -DHAVE_RSOUND -DHAVE_NETPLAY -DHAVE_CAMERA -DRARCH_INTERNAL
|
||||
LOCAL_CFLAGS += -Wall -pthread -Wno-unused-function -O3 -fno-stack-protector -funroll-loops -DNDEBUG -DRARCH_MOBILE -DHAVE_GRIFFIN -DANDROID -DHAVE_DYNAMIC -DHAVE_OPENGL -DHAVE_FBO -DHAVE_OVERLAY -DHAVE_OPENGLES -DHAVE_VID_CONTEXT -DHAVE_OPENGLES2 -DGLSL_DEBUG -DHAVE_GLSL -DHAVE_MENU -DHAVE_RGUI -DHAVE_SCREENSHOTS -DWANT_MINIZ -DHAVE_ZLIB -DINLINE=inline -DLSB_FIRST -DHAVE_THREADS -D__LIBRETRO__ -I../../../deps/miniz -DHAVE_RSOUND -DHAVE_NETPLAY -DHAVE_CAMERA -DRARCH_INTERNAL -DHAVE_LOCATION
|
||||
|
||||
LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -landroid -lEGL -lGLESv2 $(LOGGER_LDLIBS) -ldl
|
||||
|
||||
|
@ -28,7 +28,7 @@ typedef struct android_location
|
||||
jmethodID onLocationGetLatitude;
|
||||
} androidlocation_t;
|
||||
|
||||
static void *android_location_init(unsigned interval_ms, unsigned interval_distance)
|
||||
static void *android_location_init(int interval_ms, int interval_distance)
|
||||
{
|
||||
JNIEnv *env;
|
||||
jclass class;
|
||||
@ -97,7 +97,7 @@ static void android_location_free(void *data)
|
||||
free(androidlocation);
|
||||
}
|
||||
|
||||
static bool android_camera_start(void *data)
|
||||
static bool android_location_start(void *data)
|
||||
{
|
||||
struct android_app *android_app = (struct android_app*)g_android;
|
||||
androidlocation_t *androidlocation = (androidlocation_t*)data;
|
||||
@ -127,10 +127,10 @@ static double android_location_get_latitude(void *data)
|
||||
androidlocation_t *androidlocation = (androidlocation_t*)data;
|
||||
JNIEnv *env = jni_thread_getenv();
|
||||
if (!env)
|
||||
return;
|
||||
return 0.0;
|
||||
|
||||
jdouble latitude;
|
||||
CALL_BOOLEAN_METHOD(env, longitude, android_app->activity->clazz, androidlocation->onLocationGetLatitude);
|
||||
CALL_BOOLEAN_METHOD(env, latitude, android_app->activity->clazz, androidlocation->onLocationGetLatitude);
|
||||
return latitude;
|
||||
}
|
||||
|
||||
@ -140,7 +140,7 @@ static double android_location_get_longitude(void *data)
|
||||
androidlocation_t *androidlocation = (androidlocation_t*)data;
|
||||
JNIEnv *env = jni_thread_getenv();
|
||||
if (!env)
|
||||
return;
|
||||
return 0.0;
|
||||
|
||||
jdouble longitude;
|
||||
CALL_BOOLEAN_METHOD(env, longitude, android_app->activity->clazz, androidlocation->onLocationGetLongitude);
|
||||
|
Loading…
Reference in New Issue
Block a user