From 92b15cf0b1a9f5b5efe97bc8de22b0f6e6a4fe79 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 11 Sep 2014 18:35:53 +0200 Subject: [PATCH] (XDK) Build fixes --- gfx/d3d9/d3d_shared.h | 10 +++++++++- gfx/d3d9/xdk_d3d.cpp | 16 ++++++++++++---- gfx/d3d9/xdk_d3d.h | 3 +++ 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/gfx/d3d9/d3d_shared.h b/gfx/d3d9/d3d_shared.h index b87de79d2e..cd05ffd907 100644 --- a/gfx/d3d9/d3d_shared.h +++ b/gfx/d3d9/d3d_shared.h @@ -1,4 +1,5 @@ #include "d3d_defines.h" +#include "../gfx_common.h" /* forward declarations */ static void d3d_calculate_rect(d3d_video_t *d3d, @@ -13,6 +14,13 @@ static void d3d_deinit_chain(d3d_video_t *d3d); static bool d3d_init_chain(d3d_video_t *d3d, const video_info_t *video_info); +static void renderchain_free(d3d_video_t *d3d); +static void d3d_deinit_shader(d3d_video_t *d3d); +static bool d3d_init_shader(d3d_video_t *d3d); + +void d3d_make_d3dpp(void *data, const video_info_t *info, + D3DPRESENT_PARAMETERS *d3dpp); + #ifdef HAVE_WINDOW #define IDI_ICON 1 #define MAX_MONITORS 9 @@ -397,7 +405,7 @@ static bool d3d_construct(d3d_video_t *d3d, (int)(mon_rect.bottom - mon_rect.top)); #else if (d3d->ctx_driver && d3d->ctx_driver->get_video_size) - d3d->ctx_driver->get_video_size(&full_x, &full_y); + d3d->ctx_driver->get_video_size(d3d, &full_x, &full_y); #endif d3d->screen_width = info->fullscreen ? full_x : info->width; d3d->screen_height = info->fullscreen ? full_y : info->height; diff --git a/gfx/d3d9/xdk_d3d.cpp b/gfx/d3d9/xdk_d3d.cpp index 3f48c24a35..b8279cc59e 100644 --- a/gfx/d3d9/xdk_d3d.cpp +++ b/gfx/d3d9/xdk_d3d.cpp @@ -34,7 +34,16 @@ #include "render_chain_xdk.h" -#include "d3d_shared.h" +static void d3d_deinit_shader(d3d_video_t *d3d) +{ + (void)d3d; +} + +static bool d3d_init_shader(d3d_video_t *d3d) +{ + (void)d3d; + return false; +} static void d3d_free(void *data) { @@ -91,10 +100,9 @@ static bool d3d_set_shader(void *data, return true; } -static bool d3d_init_chain(void *data, const video_info_t *info) +static bool d3d_init_chain(d3d_video_t *d3d, const video_info_t *info) { - d3d_video_t *d3d = (d3d_video_t*)data; - d3d_video_t *link_info = (d3d_video_t*)data; + d3d_video_t *link_info = (d3d_video_t*)d3d; LPDIRECT3DDEVICE d3dr = (LPDIRECT3DDEVICE)d3d->dev; link_info->tex_w = link_info->tex_h = RARCH_SCALE_BASE * info->input_scale; diff --git a/gfx/d3d9/xdk_d3d.h b/gfx/d3d9/xdk_d3d.h index 277c145a94..6a9141e286 100644 --- a/gfx/d3d9/xdk_d3d.h +++ b/gfx/d3d9/xdk_d3d.h @@ -21,6 +21,7 @@ #ifdef _XBOX1 #include #endif +#include "d3d_defines.h" #include "../../gfx/shader_common.h" #include "../../gfx/shader_parse.h" #include "../../gfx/image/image.h" @@ -115,6 +116,8 @@ typedef struct d3d_video #endif } d3d_video_t; +#include "d3d_shared.h" + extern void d3d_make_d3dpp(void *data, const video_info_t *info, D3DPRESENT_PARAMETERS *d3dpp); extern bool texture_image_render(struct texture_image *out_img);