diff --git a/command.h b/command.h index a58e1e6a3b..e4f54b55ee 100644 --- a/command.h +++ b/command.h @@ -23,6 +23,10 @@ #include #include "boolean.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef struct rarch_cmd rarch_cmd_t; rarch_cmd_t *rarch_cmd_new(bool stdin_enable, bool network_enable, uint16_t port); @@ -36,5 +40,9 @@ bool rarch_cmd_get(rarch_cmd_t *handle, unsigned id); bool network_cmd_send(const char *cmd); #endif +#ifdef __cplusplus +} +#endif + #endif diff --git a/core_options.h b/core_options.h index 7c6c5649b0..42f408497f 100644 --- a/core_options.h +++ b/core_options.h @@ -20,6 +20,10 @@ #include "libretro.h" #include +#ifdef __cplusplus +extern "C" { +#endif + typedef struct core_option_manager core_option_manager_t; core_option_manager_t *core_option_new(const char *conf_path, const struct retro_variable *vars); @@ -43,5 +47,9 @@ void core_option_prev(core_option_manager_t *opt, size_t index); // Sets default val for an option. void core_option_set_default(core_option_manager_t *opt, size_t index); +#ifdef __cplusplus +} +#endif + #endif diff --git a/driver.h b/driver.h index 668c89ae57..e5490a0876 100644 --- a/driver.h +++ b/driver.h @@ -34,6 +34,10 @@ #include "command.h" #endif +#ifdef __cplusplus +extern "C" { +#endif + #define AUDIO_CHUNK_SIZE_BLOCKING 512 #define AUDIO_CHUNK_SIZE_NONBLOCKING 2048 // So we don't get complete line-noise when fast-forwarding audio. #define AUDIO_MAX_RATIO 16 @@ -512,5 +516,9 @@ extern const input_driver_t input_null; #include "driver_funcs.h" +#ifdef __cplusplus +} +#endif + #endif diff --git a/frontend/menu/rgui.c b/frontend/menu/rgui.c index 40d1d3d639..ae0ec50b3f 100644 --- a/frontend/menu/rgui.c +++ b/frontend/menu/rgui.c @@ -1419,7 +1419,7 @@ static int rgui_viewport_iterate(rgui_handle_t *rgui, rgui_action_t action) if (menu_type == RGUI_SETTINGS_CUSTOM_VIEWPORT) { custom->y += stride_y; - if (custom->height >= stride_y) + if (custom->height >= (unsigned)stride_y) custom->height -= stride_y; } else @@ -1797,7 +1797,7 @@ static bool directory_parse(rgui_handle_t *rgui, const char *directory, unsigned int rgui_iterate(rgui_handle_t *rgui) { - uint64_t action = RGUI_ACTION_NOOP; + rgui_action_t action = RGUI_ACTION_NOOP; // don't run anything first frame, only capture held inputs for old_input_state if (rgui->trigger_state & (1ULL << DEVICE_NAV_UP)) diff --git a/message.h b/message.h index c58543e4ba..f8fd4d6216 100644 --- a/message.h +++ b/message.h @@ -19,6 +19,10 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + typedef struct msg_queue msg_queue_t; // Creates a message queue with maximum size different messages. Returns NULL if allocation error. @@ -35,4 +39,8 @@ void msg_queue_clear(msg_queue_t *queue); void msg_queue_free(msg_queue_t *queue); +#ifdef __cplusplus +} +#endif + #endif