mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +00:00
(Apple) Build fixes
This commit is contained in:
parent
dfe42f4026
commit
ccd2246331
4
driver.c
4
driver.c
@ -821,8 +821,8 @@ void init_drivers(void)
|
|||||||
#ifdef HAVE_LOCATION
|
#ifdef HAVE_LOCATION
|
||||||
// FIXME
|
// FIXME
|
||||||
// Only init location driver if we're ever going to use it.
|
// Only init location driver if we're ever going to use it.
|
||||||
if (g_extern.system.location_callback)
|
if (g_extern.system.location_callback.enable)
|
||||||
init_location();
|
init_location();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_OSK
|
#ifdef HAVE_OSK
|
||||||
|
@ -839,7 +839,7 @@ bool rarch_environment_cb(unsigned cmd, void *data)
|
|||||||
case RETRO_ENVIRONMENT_GET_LOCATION_INTERFACE:
|
case RETRO_ENVIRONMENT_GET_LOCATION_INTERFACE:
|
||||||
{
|
{
|
||||||
RARCH_LOG("Environ GET_LOCATION_INTERFACE.\n");
|
RARCH_LOG("Environ GET_LOCATION_INTERFACE.\n");
|
||||||
struct retro_location_interface *cb = (struct retro_location_interface*)data;
|
struct retro_location_callback *cb = (struct retro_location_callback*)data;
|
||||||
g_extern.system.location_callback = *cb;
|
g_extern.system.location_callback = *cb;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -427,9 +427,7 @@ struct global
|
|||||||
struct retro_disk_control_callback disk_control;
|
struct retro_disk_control_callback disk_control;
|
||||||
struct retro_hw_render_callback hw_render_callback;
|
struct retro_hw_render_callback hw_render_callback;
|
||||||
struct retro_camera_callback camera_callback;
|
struct retro_camera_callback camera_callback;
|
||||||
#ifdef HAVE_LOCATION
|
|
||||||
struct retro_location_callback location_callback;
|
struct retro_location_callback location_callback;
|
||||||
#endif
|
|
||||||
|
|
||||||
struct retro_frame_time_callback frame_time;
|
struct retro_frame_time_callback frame_time;
|
||||||
retro_usec_t frame_time_last;
|
retro_usec_t frame_time_last;
|
||||||
|
39
libretro.h
39
libretro.h
@ -568,6 +568,12 @@ enum retro_mod
|
|||||||
// struct retro_perf_callback * --
|
// struct retro_perf_callback * --
|
||||||
// Gets an interface for performance counters. This is useful for performance logging in a
|
// Gets an interface for performance counters. This is useful for performance logging in a
|
||||||
// cross-platform way and for detecting architecture-specific features, such as SIMD support.
|
// cross-platform way and for detecting architecture-specific features, such as SIMD support.
|
||||||
|
#define RETRO_ENVIRONMENT_GET_LOCATION_INTERFACE 29
|
||||||
|
// struct retro_location_callback * --
|
||||||
|
// Gets access to the location interface.
|
||||||
|
// The purpose of this interface is to be able to retrieve location-based information from the host device,
|
||||||
|
// such as current latitude / longitude.
|
||||||
|
//
|
||||||
|
|
||||||
enum retro_log_level
|
enum retro_log_level
|
||||||
{
|
{
|
||||||
@ -743,6 +749,39 @@ struct retro_camera_callback
|
|||||||
retro_camera_lifetime_status_t deinitialized;
|
retro_camera_lifetime_status_t deinitialized;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//Sets the interval of time and/or distance at which to update/poll location-based data.
|
||||||
|
//To ensure compatibility with all location-based implementations, values for both
|
||||||
|
//interval_ms and interval_distance should be provided.
|
||||||
|
//interval_ms is the interval expressed in milliseconds
|
||||||
|
//interval_distance is the distance interval expressed in meters.
|
||||||
|
typedef void (*retro_location_set_interval_t)(int interval_ms, int interval_distance);
|
||||||
|
|
||||||
|
//Start location services. The device will start listening for changes to the
|
||||||
|
//current location at regular intervals (which are defined with retro_location_set_interval_t).
|
||||||
|
typedef void (*retro_location_start_t)(void);
|
||||||
|
|
||||||
|
//Stop location services. The device will stop listening for changes to the current
|
||||||
|
//location.
|
||||||
|
typedef void (*retro_location_stop_t)(void);
|
||||||
|
|
||||||
|
//Get the latitude of the current location.
|
||||||
|
typedef double (*retro_location_get_latitude_t)(void);
|
||||||
|
|
||||||
|
//Get the longitude of the current location.
|
||||||
|
typedef double (*retro_location_get_longitude_t)(void);
|
||||||
|
|
||||||
|
struct retro_location_callback
|
||||||
|
{
|
||||||
|
bool enable;
|
||||||
|
int interval_in_ms;
|
||||||
|
int interval_distance_in_meters;
|
||||||
|
retro_location_start_t start;
|
||||||
|
retro_location_stop_t stop;
|
||||||
|
retro_location_get_latitude_t get_latitude;
|
||||||
|
retro_location_get_longitude_t get_longitude;
|
||||||
|
retro_location_set_interval_t set_interval;
|
||||||
|
};
|
||||||
|
|
||||||
enum retro_rumble_effect
|
enum retro_rumble_effect
|
||||||
{
|
{
|
||||||
RETRO_RUMBLE_STRONG = 0,
|
RETRO_RUMBLE_STRONG = 0,
|
||||||
|
@ -40,44 +40,7 @@
|
|||||||
// Requests that this core is deinitialized, and a new core is loaded. It also escapes the main loop the core is currently
|
// Requests that this core is deinitialized, and a new core is loaded. It also escapes the main loop the core is currently
|
||||||
// bound to.
|
// bound to.
|
||||||
// The libretro core used is set with SET_LIBRETRO_PATH, and path to game is passed in _EXEC. NULL means no game.
|
// The libretro core used is set with SET_LIBRETRO_PATH, and path to game is passed in _EXEC. NULL means no game.
|
||||||
#define RETRO_ENVIRONMENT_GET_LOCATION_INTERFACE (RETRO_ENVIRONMENT_PRIVATE | 3)
|
|
||||||
// struct retro_location_callback * --
|
|
||||||
// Gets access to the location interface.
|
|
||||||
// The purpose of this interface is to be able to retrieve location-based information from the host device,
|
|
||||||
// such as current latitude / longitude.
|
|
||||||
//
|
|
||||||
|
|
||||||
//Sets the interval of time and/or distance at which to update/poll location-based data.
|
|
||||||
//To ensure compatibility with all location-based implementations, values for both
|
|
||||||
//interval_ms and interval_distance should be provided.
|
|
||||||
//interval_ms is the interval expressed in milliseconds
|
|
||||||
//interval_distance is the distance interval expressed in meters.
|
|
||||||
typedef void (*retro_location_set_interval_t)(int interval_ms, int interval_distance);
|
|
||||||
|
|
||||||
//Start location services. The device will start listening for changes to the
|
|
||||||
//current location at regular intervals (which are defined with retro_location_set_interval_t).
|
|
||||||
typedef void (*retro_location_start_t)(void);
|
|
||||||
|
|
||||||
//Stop location services. The device will stop listening for changes to the current
|
|
||||||
//location.
|
|
||||||
typedef void (*retro_location_stop_t)(void);
|
|
||||||
|
|
||||||
//Get the latitude of the current location.
|
|
||||||
typedef double (*retro_location_get_latitude_t)(void);
|
|
||||||
|
|
||||||
//Get the longitude of the current location.
|
|
||||||
typedef double (*retro_location_get_longitude_t)(void);
|
|
||||||
|
|
||||||
struct retro_location_callback
|
|
||||||
{
|
|
||||||
int interval_in_ms;
|
|
||||||
int interval_distance_in_meters;
|
|
||||||
retro_location_start_t start;
|
|
||||||
retro_location_stop_t stop;
|
|
||||||
retro_location_get_latitude_t get_latitude;
|
|
||||||
retro_location_get_longitude_t get_longitude;
|
|
||||||
retro_location_set_interval_t set_interval;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user