diff --git a/gfx/video_texture.h b/gfx/video_texture.h index 993f189e67..d26e02d391 100644 --- a/gfx/video_texture.h +++ b/gfx/video_texture.h @@ -26,7 +26,7 @@ enum texture_backend_type TEXTURE_BACKEND_DIRECT3D }; -#if defined(__cplusplus) && !defined(_WIN32) +#ifdef __cplusplus extern "C" { #endif @@ -36,7 +36,7 @@ unsigned video_texture_load(void *data, void video_texture_unload(enum texture_backend_type type, uintptr_t *id); -#if defined(__cplusplus) && !defined(_WIN32) +#ifdef __cplusplus } #endif diff --git a/gfx/video_texture_c.c b/gfx/video_texture_c.c index ce8c8e44a6..496175a4bd 100644 --- a/gfx/video_texture_c.c +++ b/gfx/video_texture_c.c @@ -21,9 +21,13 @@ #include "video_thread_wrapper.h" #ifdef HAVE_OPENGL -#include "drivers/gl_common.h" -static void video_texture_png_load_gl(struct texture_image *ti, +#ifdef __cplusplus +extern "C" { +#endif + +#include "drivers/gl_common.h" +void video_texture_png_load_gl(struct texture_image *ti, enum texture_filter_type filter_type, uintptr_t *id) { @@ -36,6 +40,11 @@ static void video_texture_png_load_gl(struct texture_image *ti, sizeof(uint32_t) /* TODO/FIXME - dehardcode */ ); } + +#ifdef __cplusplus +} +#endif + #endif #ifdef HAVE_D3D @@ -111,6 +120,10 @@ static int video_texture_png_load_wrap_d3d(void *data) TEXTURE_FILTER_LINEAR); } +#ifdef __cplusplus +extern "C" { +#endif + unsigned video_texture_load(void *data, enum texture_backend_type type, enum texture_filter_type filter_type) @@ -160,6 +173,10 @@ unsigned video_texture_load(void *data, return video_texture_png_load(data, type, filter_type); } +#ifdef __cplusplus +} +#endif + #ifdef HAVE_OPENGL static void video_texture_gl_unload(uintptr_t *id) {