From 01390f8ceb98cce86a336eb8ca8517082ceb1259 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 3 Jun 2016 08:06:49 +0200 Subject: [PATCH] Use retro_common_api.h --- gfx/common/d3d_common.h | 9 +++------ gfx/common/drm_common.h | 9 +++------ gfx/common/egl_common.h | 9 +++------ gfx/common/vulkan_common.h | 9 +++------ gfx/common/win32_common.h | 9 +++------ gfx/d3d/render_chain_driver.h | 9 +++------ gfx/drivers_shader/shader_vulkan.h | 13 +++++-------- ui/drivers/qt/wrapper/wrapper.h | 10 ++++------ 8 files changed, 27 insertions(+), 50 deletions(-) diff --git a/gfx/common/d3d_common.h b/gfx/common/d3d_common.h index 6da1fb0e67..dcae9f221c 100644 --- a/gfx/common/d3d_common.h +++ b/gfx/common/d3d_common.h @@ -17,13 +17,12 @@ #define _D3D_COMMON_H #include +#include #include "win32_common.h" #include "../../defines/d3d_defines.h" -#ifdef __cplusplus -extern "C" { -#endif +RETRO_BEGIN_DECLS bool d3d_swap(void *data, LPDIRECT3DDEVICE dev); @@ -115,8 +114,6 @@ void d3d_device_free(LPDIRECT3DDEVICE dev, LPDIRECT3D pd3d); D3DTEXTUREFILTERTYPE d3d_translate_filter(unsigned type); -#ifdef __cplusplus -} -#endif +RETRO_END_DECLS #endif diff --git a/gfx/common/drm_common.h b/gfx/common/drm_common.h index 35ebda7df8..cd048f5519 100644 --- a/gfx/common/drm_common.h +++ b/gfx/common/drm_common.h @@ -24,11 +24,10 @@ #include #include +#include #include -#ifdef __cplusplus -extern "C" { -#endif +RETRO_BEGIN_DECLS extern uint32_t g_connector_id; extern int g_drm_fd; @@ -73,8 +72,6 @@ static INLINE bool drm_wait_flip(int timeout) return false; } -#ifdef __cplusplus -} -#endif +RETRO_END_DECLS #endif diff --git a/gfx/common/egl_common.h b/gfx/common/egl_common.h index 15385bcabd..48b34eedef 100644 --- a/gfx/common/egl_common.h +++ b/gfx/common/egl_common.h @@ -22,12 +22,11 @@ #include #include +#include #include "../video_context_driver.h" -#ifdef __cplusplus -extern "C" { -#endif +RETRO_BEGIN_DECLS /* Put this structure as the first member of egl-based contexts * like this: @@ -97,8 +96,6 @@ bool egl_get_native_visual_id(egl_ctx_data_t *egl, EGLint *value); bool egl_has_config(egl_ctx_data_t *egl); -#ifdef __cplusplus -} -#endif +RETRO_END_DECLS #endif diff --git a/gfx/common/vulkan_common.h b/gfx/common/vulkan_common.h index 0bfc9c4d17..8a5bfe8bdd 100644 --- a/gfx/common/vulkan_common.h +++ b/gfx/common/vulkan_common.h @@ -32,6 +32,7 @@ #include #include +#include #include #include #include @@ -48,9 +49,7 @@ #include "../video_context_driver.h" #include "../drivers_shader/shader_vulkan.h" -#ifdef __cplusplus -extern "C" { -#endif +RETRO_BEGIN_DECLS typedef struct vulkan_filter_chain vulkan_filter_chain_t; @@ -509,9 +508,7 @@ bool vulkan_create_swapchain(gfx_ctx_vulkan_data_t *vk, unsigned width, unsigned height, unsigned swap_interval); -#ifdef __cplusplus -} -#endif +RETRO_END_DECLS #endif diff --git a/gfx/common/win32_common.h b/gfx/common/win32_common.h index 741e70e506..7a84211c9e 100644 --- a/gfx/common/win32_common.h +++ b/gfx/common/win32_common.h @@ -25,6 +25,7 @@ #endif #include +#include #include "../../driver.h" #include "../video_context_driver.h" @@ -66,15 +67,11 @@ bool win32_monitor_set_fullscreen(unsigned width, unsigned height, unsigned refresh, char *dev_name); #ifndef _XBOX -#ifdef __cplusplus -extern "C" { -#endif +RETRO_BEGIN_DECLS bool win32_window_init(WNDCLASSEX *wndclass, bool fullscreen, const char *class_name); -#ifdef __cplusplus -} -#endif +RETRO_END_DECLS #endif bool win32_window_create(void *data, unsigned style, diff --git a/gfx/d3d/render_chain_driver.h b/gfx/d3d/render_chain_driver.h index 7ccb55be87..ea571f0937 100644 --- a/gfx/d3d/render_chain_driver.h +++ b/gfx/d3d/render_chain_driver.h @@ -17,6 +17,7 @@ #ifndef __D3D_RENDER_CHAIN_H #define __D3D_RENDER_CHAIN_H +#include #include #include "../video_driver.h" @@ -24,9 +25,7 @@ #include "../video_state_tracker.h" #include "../../defines/d3d_defines.h" -#ifdef __cplusplus -extern "C" { -#endif +RETRO_BEGIN_DECLS struct LinkInfo { @@ -79,9 +78,7 @@ extern renderchain_driver_t null_renderchain; bool renderchain_init_first(const renderchain_driver_t **renderchain_driver, void **renderchain_handle); -#ifdef __cplusplus -} -#endif +RETRO_END_DECLS #endif diff --git a/gfx/drivers_shader/shader_vulkan.h b/gfx/drivers_shader/shader_vulkan.h index fe638eae55..612d122349 100644 --- a/gfx/drivers_shader/shader_vulkan.h +++ b/gfx/drivers_shader/shader_vulkan.h @@ -19,13 +19,12 @@ #include #include +#include +#include + #include "../common/vulkan_common.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif +RETRO_BEGIN_DECLS typedef struct vulkan_filter_chain vulkan_filter_chain_t; @@ -144,9 +143,7 @@ vulkan_filter_chain_t *vulkan_filter_chain_create_from_preset( struct video_shader *vulkan_filter_chain_get_preset( vulkan_filter_chain_t *chain); -#ifdef __cplusplus -} -#endif +RETRO_END_DECLS #endif diff --git a/ui/drivers/qt/wrapper/wrapper.h b/ui/drivers/qt/wrapper/wrapper.h index 5329613c7d..ef8e9ab8f7 100644 --- a/ui/drivers/qt/wrapper/wrapper.h +++ b/ui/drivers/qt/wrapper/wrapper.h @@ -17,15 +17,15 @@ #define HAVE_MENU #endif +#include + #include "config.h" #include "configuration.h" #ifndef WRAPPER_H #define WRAPPER_H -#ifdef __cplusplus -extern "C" { -#endif +RETRO_BEGIN_DECLS typedef struct Wimp Wimp; typedef settings_t (*config_get_ptr_cb); @@ -35,8 +35,6 @@ Wimp* ctrWimp(int argc, char *argv[]); int CreateMainWindow(Wimp* p); void GetSettings(Wimp* p, settings_t *s); -#ifdef __cplusplus -} -#endif +RETRO_END_DECLS #endif // WRAPPER_H