mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
(D3D) N/A
This commit is contained in:
parent
0f0e21441d
commit
620ea3af74
@ -27,6 +27,7 @@
|
||||
#include <retro_inline.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
#include <compat/strl.h>
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#include "render_chain_driver.h"
|
||||
#include "../video_driver.h"
|
||||
@ -195,7 +196,7 @@ static INLINE CGparameter find_param_from_semantic(
|
||||
}
|
||||
|
||||
static bool d3d9_cg_load_program(void *data,
|
||||
void *fragment_data, void *vertex_data, const std::string &shader, bool path_is_file)
|
||||
void *fragment_data, void *vertex_data, const char *shader, bool path_is_file)
|
||||
{
|
||||
char *listing_f = NULL;
|
||||
char *listing_v = NULL;
|
||||
@ -210,13 +211,13 @@ static bool d3d9_cg_load_program(void *data,
|
||||
RARCH_LOG("[D3D Cg]: Vertex profile: %s\n", cgGetProfileString(vertex_profile));
|
||||
RARCH_LOG("[D3D Cg]: Fragment profile: %s\n", cgGetProfileString(fragment_profile));
|
||||
|
||||
if (path_is_file && shader.length() > 0)
|
||||
if (path_is_file && !string_is_empty(shader))
|
||||
{
|
||||
*fPrg = cgCreateProgramFromFile(cg_data->cgCtx, CG_SOURCE,
|
||||
shader.c_str(), fragment_profile, "main_fragment", fragment_opts);
|
||||
shader, fragment_profile, "main_fragment", fragment_opts);
|
||||
CG_D3D_SET_LISTING(cg_data, f);
|
||||
*vPrg = cgCreateProgramFromFile(cg_data->cgCtx, CG_SOURCE,
|
||||
shader.c_str(), vertex_profile, "main_vertex", vertex_opts);
|
||||
shader, vertex_profile, "main_vertex", vertex_opts);
|
||||
CG_D3D_SET_LISTING(cg_data, v);
|
||||
}
|
||||
else
|
||||
@ -895,7 +896,7 @@ static bool cg_d3d9_renderchain_init(void *data,
|
||||
if (!renderchain_create_first_pass(chain, info, fmt))
|
||||
return false;
|
||||
renderchain_log_info(chain, info);
|
||||
if (!d3d9_cg_load_program(chain, &chain->fStock, &chain->vStock, "", false))
|
||||
if (!d3d9_cg_load_program(chain, &chain->fStock, &chain->vStock, NULL, false))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user