From ef5ead87c261a81125c2cb4194335e6c9a99984c Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 12 Jan 2014 13:20:22 +0100 Subject: [PATCH] Upgrade libretro header --- libretro.h | 53 +++++++++++++++++++++++++++++++++++++++++++++- libretro_private.h | 3 ++- 2 files changed, 54 insertions(+), 2 deletions(-) diff --git a/libretro.h b/libretro.h index ede60f0..c15c3f9 100755 --- a/libretro.h +++ b/libretro.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2013 The RetroArch team +/* Copyright (C) 2010-2014 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this libretro API header (libretro.h). @@ -568,6 +568,21 @@ enum retro_mod // struct retro_perf_callback * -- // 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. +#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. + // +#define RETRO_ENVIRONMENT_GET_CONTENT_DIRECTORY 30 + // const char ** -- + // Returns the "content" directory of the frontend. + // This directory can be used to store specific assets that the core relies upon, such as art assets, + // input data, etc etc. + // The returned value can be NULL. + // If so, no such directory is defined, + // and it's up to the implementation to find a suitable directory. + // enum retro_log_level { @@ -598,6 +613,7 @@ struct retro_log_callback #define RETRO_SIMD_NEON (1 << 5) #define RETRO_SIMD_SSE3 (1 << 6) #define RETRO_SIMD_SSSE3 (1 << 7) +#define RETRO_SIMD_MMX (1 << 8) typedef uint64_t retro_perf_tick_t; typedef int64_t retro_time_t; @@ -743,6 +759,41 @@ struct retro_camera_callback 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)(unsigned interval_ms, unsigned 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 bool (*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 position of the current location. Will set parameters to 0 if no new +// location update has happened since the last time. +typedef bool (*retro_location_get_position_t)(double *lat, double *lon, double *horiz_accuracy, + double *vert_accuracy); + +// Callback which signals when the location driver is initialized and/or deinitialized. +// retro_location_start_t can be called in initialized callback. +typedef void (*retro_location_lifetime_status_t)(void); + +struct retro_location_callback +{ + retro_location_start_t start; + retro_location_stop_t stop; + retro_location_get_position_t get_position; + retro_location_set_interval_t set_interval; + + retro_location_lifetime_status_t initialized; + retro_location_lifetime_status_t deinitialized; +}; + enum retro_rumble_effect { RETRO_RUMBLE_STRONG = 0, diff --git a/libretro_private.h b/libretro_private.h index a393412..3751d3a 100644 --- a/libretro_private.h +++ b/libretro_private.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010-2013 The RetroArch team +/* Copyright (C) 2010-2014 The RetroArch team * * --------------------------------------------------------------------------------------- * The following license statement only applies to this libretro API header (libretro_private.h). @@ -41,5 +41,6 @@ // bound to. // The libretro core used is set with SET_LIBRETRO_PATH, and path to game is passed in _EXEC. NULL means no game. + #endif