Compile video_texture as C++ for Win32

This commit is contained in:
twinaphex 2015-11-09 01:19:09 +01:00
parent bbeebcc29a
commit cb9960c6e2
7 changed files with 24 additions and 4 deletions

View File

@ -569,10 +569,15 @@ endif
OBJ += gfx/video_context_driver.o \
gfx/drivers_context/gfx_null_ctx.o \
gfx/video_state_tracker.o \
gfx/video_texture.o \
libretro-common/gfx/math/matrix_4x4.o \
libretro-common/gfx/math/matrix_3x3.o
ifneq ($(findstring Win32,$(OS)),)
OBJ += gfx/video_texture.o
else
OBJ += gfx/video_texture_c.o
endif
ifeq ($(HAVE_GL_CONTEXT), 1)
DEFINES += -DHAVE_OPENGL -DHAVE_GLSL
OBJ += gfx/drivers/gl.o \

View File

@ -22,6 +22,10 @@
#include "../common/win32_common.h"
#include "d3d_defines.h"
#ifdef __cplusplus
extern "C" {
#endif
bool d3d_swap(void *data, LPDIRECT3DDEVICE dev);
LPDIRECT3DVERTEXBUFFER d3d_vertex_buffer_new(LPDIRECT3DDEVICE dev,
@ -95,4 +99,8 @@ void d3d_enable_alpha_blend_texture_func(void *data);
void d3d_frame_postprocess(void *data);
#ifdef __cplusplus
}
#endif
#endif

1
gfx/video_texture.cpp Normal file
View File

@ -0,0 +1 @@
#include "video_texture.c"

View File

@ -26,7 +26,7 @@ enum texture_backend_type
TEXTURE_BACKEND_DIRECT3D
};
#ifdef __cplusplus
#if defined(__cplusplus) && !defined(_WIN32)
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);
#ifdef __cplusplus
#if defined(__cplusplus) && !defined(_WIN32)
}
#endif

View File

@ -192,7 +192,10 @@ VIDEO IMAGE
============================================================ */
#include "../gfx/image/image.c"
#include "../gfx/video_texture.c"
#if !defined(_WIN32)
#include "../gfx/video_texture_c.c"
#endif
#include "../libretro-common/formats/tga/rtga.c"

View File

@ -53,6 +53,9 @@ VIDEO DRIVER
#ifdef _XBOX
#include "../frontend/drivers/platform_xdk.cpp"
#endif
#ifdef _WIN32
#include "../gfx/video_texture.cpp"
#endif
#if defined(HAVE_D3D)
#include "../gfx/d3d/d3d_wrapper.cpp"