From 6e04afad4dc995b79f569d3d21cb1c4bd36a8fe1 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 5 Apr 2015 02:31:24 +0200 Subject: [PATCH] (D3D) Update --- gfx/d3d/render_chain.cpp | 39 +++++++++++++++++++++------------------ gfx/d3d/render_chain.h | 4 ++-- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/gfx/d3d/render_chain.cpp b/gfx/d3d/render_chain.cpp index 2851c13ac3..61f92ba36f 100644 --- a/gfx/d3d/render_chain.cpp +++ b/gfx/d3d/render_chain.cpp @@ -214,31 +214,34 @@ bool renderchain_add_pass(void *data, const void *info_data) return true; } -bool renderchain_add_lut(void *data, const std::string &id, - const std::string &path, +bool renderchain_add_lut(void *data, const char *id, + const char *path, bool smooth) { + lut_info info; renderchain_t *chain = (renderchain_t*)data; LPDIRECT3DDEVICE d3dr = chain->dev; LPDIRECT3DTEXTURE lut = (LPDIRECT3DTEXTURE) - d3d_texture_new(d3dr, - path.c_str(), - D3DX_DEFAULT_NONPOW2, - D3DX_DEFAULT_NONPOW2, - 0, - 0, - D3DFMT_FROM_FILE, - D3DPOOL_MANAGED, - smooth ? D3DX_FILTER_LINEAR : D3DX_FILTER_POINT, - 0, - 0, - NULL, - NULL - ); + d3d_texture_new(d3dr, + path, + D3DX_DEFAULT_NONPOW2, + D3DX_DEFAULT_NONPOW2, + 0, + 0, + D3DFMT_FROM_FILE, + D3DPOOL_MANAGED, + smooth ? D3DX_FILTER_LINEAR : D3DX_FILTER_POINT, + 0, + 0, + NULL, + NULL + ); - RARCH_LOG("[D3D]: LUT texture loaded: %s.\n", path.c_str()); + RARCH_LOG("[D3D]: LUT texture loaded: %s.\n", path); - lut_info info = { lut, id, smooth }; + info.tex = lut; + info.smooth = smooth; + strcpy(info.id, id); if (!lut) return false; diff --git a/gfx/d3d/render_chain.h b/gfx/d3d/render_chain.h index e0bd5a8fdf..09fc0aac3a 100644 --- a/gfx/d3d/render_chain.h +++ b/gfx/d3d/render_chain.h @@ -121,8 +121,8 @@ bool renderchain_set_pass_size(void *data, unsigned pass_index, bool renderchain_add_pass(void *data, const void *info_data); -bool renderchain_add_lut(void *data, const std::string &id, - const std::string &path, +bool renderchain_add_lut(void *data, + const char *id, const char *path, bool smooth); void renderchain_add_state_tracker(void *data, void *tracker_data);