Fix linking problems

This commit is contained in:
twinaphex 2015-11-09 01:33:46 +01:00
parent 15fc4fe118
commit e81e027022
2 changed files with 21 additions and 4 deletions

View File

@ -26,7 +26,7 @@ enum texture_backend_type
TEXTURE_BACKEND_DIRECT3D TEXTURE_BACKEND_DIRECT3D
}; };
#if defined(__cplusplus) && !defined(_WIN32) #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@ -36,7 +36,7 @@ unsigned video_texture_load(void *data,
void video_texture_unload(enum texture_backend_type type, uintptr_t *id); void video_texture_unload(enum texture_backend_type type, uintptr_t *id);
#if defined(__cplusplus) && !defined(_WIN32) #ifdef __cplusplus
} }
#endif #endif

View File

@ -21,9 +21,13 @@
#include "video_thread_wrapper.h" #include "video_thread_wrapper.h"
#ifdef HAVE_OPENGL #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, enum texture_filter_type filter_type,
uintptr_t *id) uintptr_t *id)
{ {
@ -36,6 +40,11 @@ static void video_texture_png_load_gl(struct texture_image *ti,
sizeof(uint32_t) /* TODO/FIXME - dehardcode */ sizeof(uint32_t) /* TODO/FIXME - dehardcode */
); );
} }
#ifdef __cplusplus
}
#endif
#endif #endif
#ifdef HAVE_D3D #ifdef HAVE_D3D
@ -111,6 +120,10 @@ static int video_texture_png_load_wrap_d3d(void *data)
TEXTURE_FILTER_LINEAR); TEXTURE_FILTER_LINEAR);
} }
#ifdef __cplusplus
extern "C" {
#endif
unsigned video_texture_load(void *data, unsigned video_texture_load(void *data,
enum texture_backend_type type, enum texture_backend_type type,
enum texture_filter_type filter_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); return video_texture_png_load(data, type, filter_type);
} }
#ifdef __cplusplus
}
#endif
#ifdef HAVE_OPENGL #ifdef HAVE_OPENGL
static void video_texture_gl_unload(uintptr_t *id) static void video_texture_gl_unload(uintptr_t *id)
{ {