(D3D) Rename video_d3d9 to video_d3d

This commit is contained in:
twinaphex 2014-01-01 01:09:31 +01:00
parent 115f706f24
commit 17af6a0465
6 changed files with 60 additions and 60 deletions

View File

@ -140,7 +140,7 @@ else
endif endif
ifeq ($(HAVE_D3D9), 1) ifeq ($(HAVE_D3D9), 1)
OBJ += gfx/d3d9/d3d9.o gfx/d3d9/d3d9_pc.o gfx/d3d9/render_chain.o OBJ += gfx/d3d9/d3d.o gfx/d3d9/d3d9_pc.o gfx/d3d9/render_chain.o
DEFINES += -DHAVE_WIN32_D3D9 DEFINES += -DHAVE_WIN32_D3D9
LIBS += -ld3d9 -lcg -lcgD3D9 -ld3dx9 -ldxguid LIBS += -ld3d9 -lcg -lcgD3D9 -ld3dx9 -ldxguid
endif endif

View File

@ -105,7 +105,7 @@ static const video_driver_t *video_drivers[] = {
&video_xdk_d3d, &video_xdk_d3d,
#endif #endif
#if defined(HAVE_WIN32_D3D9) #if defined(HAVE_WIN32_D3D9)
&video_d3d9, &video_d3d,
#endif #endif
#ifdef SN_TARGET_PSP2 #ifdef SN_TARGET_PSP2
&video_vita, &video_vita,

View File

@ -651,7 +651,7 @@ extern const audio_driver_t audio_null;
extern const video_driver_t video_gl; extern const video_driver_t video_gl;
extern const video_driver_t video_psp1; extern const video_driver_t video_psp1;
extern const video_driver_t video_vita; extern const video_driver_t video_vita;
extern const video_driver_t video_d3d9; extern const video_driver_t video_d3d;
extern const video_driver_t video_gx; extern const video_driver_t video_gx;
extern const video_driver_t video_xenon360; extern const video_driver_t video_xenon360;
extern const video_driver_t video_xvideo; extern const video_driver_t video_xvideo;

View File

@ -25,7 +25,7 @@
extern "C" extern "C"
#endif #endif
static bool d3d9_frame(void *data, const void *frame, static bool d3d_frame(void *data, const void *frame,
unsigned width, unsigned height, unsigned pitch, unsigned width, unsigned height, unsigned pitch,
const char *msg) const char *msg)
{ {
@ -33,42 +33,42 @@ static bool d3d9_frame(void *data, const void *frame,
width, height, pitch, msg); width, height, pitch, msg);
} }
static void d3d9_set_nonblock_state(void *data, bool state) static void d3d_set_nonblock_state(void *data, bool state)
{ {
reinterpret_cast<D3DVideo*>(data)->set_nonblock_state(state); reinterpret_cast<D3DVideo*>(data)->set_nonblock_state(state);
} }
static bool d3d9_alive(void *data) static bool d3d_alive(void *data)
{ {
return reinterpret_cast<D3DVideo*>(data)->alive(); return reinterpret_cast<D3DVideo*>(data)->alive();
} }
static bool d3d9_focus(void *data) static bool d3d_focus(void *data)
{ {
return reinterpret_cast<D3DVideo*>(data)->focus(); return reinterpret_cast<D3DVideo*>(data)->focus();
} }
static void d3d9_set_rotation(void *data, unsigned rot) static void d3d_set_rotation(void *data, unsigned rot)
{ {
reinterpret_cast<D3DVideo*>(data)->set_rotation(rot); reinterpret_cast<D3DVideo*>(data)->set_rotation(rot);
} }
static void d3d9_free(void *data) static void d3d_free(void *data)
{ {
delete reinterpret_cast<D3DVideo*>(data); delete reinterpret_cast<D3DVideo*>(data);
} }
static void d3d9_viewport_info(void *data, struct rarch_viewport *vp) static void d3d_viewport_info(void *data, struct rarch_viewport *vp)
{ {
reinterpret_cast<D3DVideo*>(data)->viewport_info(*vp); reinterpret_cast<D3DVideo*>(data)->viewport_info(*vp);
} }
static bool d3d9_read_viewport(void *data, uint8_t *buffer) static bool d3d_read_viewport(void *data, uint8_t *buffer)
{ {
return reinterpret_cast<D3DVideo*>(data)->read_viewport(buffer); return reinterpret_cast<D3DVideo*>(data)->read_viewport(buffer);
} }
static bool d3d9_set_shader(void *data, enum rarch_shader_type type, const char *path) static bool d3d_set_shader(void *data, enum rarch_shader_type type, const char *path)
{ {
std::string shader = ""; std::string shader = "";
if (path && type == RARCH_SHADER_CG) if (path && type == RARCH_SHADER_CG)
@ -78,16 +78,16 @@ static bool d3d9_set_shader(void *data, enum rarch_shader_type type, const char
} }
#ifdef HAVE_MENU #ifdef HAVE_MENU
static void d3d9_get_poke_interface(void *data, const video_poke_interface_t **iface); static void d3d_get_poke_interface(void *data, const video_poke_interface_t **iface);
#endif #endif
#ifdef HAVE_OVERLAY #ifdef HAVE_OVERLAY
static bool d3d9_overlay_load(void *data, const texture_image *images, unsigned num_images) static bool d3d_overlay_load(void *data, const texture_image *images, unsigned num_images)
{ {
return reinterpret_cast<D3DVideo*>(data)->overlay_load(images, num_images); return reinterpret_cast<D3DVideo*>(data)->overlay_load(images, num_images);
} }
static void d3d9_overlay_tex_geom(void *data, static void d3d_overlay_tex_geom(void *data,
unsigned index, unsigned index,
float x, float y, float x, float y,
float w, float h) float w, float h)
@ -95,7 +95,7 @@ static void d3d9_overlay_tex_geom(void *data,
return reinterpret_cast<D3DVideo*>(data)->overlay_tex_geom(index, x, y, w, h); return reinterpret_cast<D3DVideo*>(data)->overlay_tex_geom(index, x, y, w, h);
} }
static void d3d9_overlay_vertex_geom(void *data, static void d3d_overlay_vertex_geom(void *data,
unsigned index, unsigned index,
float x, float y, float x, float y,
float w, float h) float w, float h)
@ -103,38 +103,38 @@ static void d3d9_overlay_vertex_geom(void *data,
return reinterpret_cast<D3DVideo*>(data)->overlay_vertex_geom(index, x, y, w, h); return reinterpret_cast<D3DVideo*>(data)->overlay_vertex_geom(index, x, y, w, h);
} }
static void d3d9_overlay_enable(void *data, bool state) static void d3d_overlay_enable(void *data, bool state)
{ {
return reinterpret_cast<D3DVideo*>(data)->overlay_enable(state); return reinterpret_cast<D3DVideo*>(data)->overlay_enable(state);
} }
static void d3d9_overlay_full_screen(void *data, bool enable) static void d3d_overlay_full_screen(void *data, bool enable)
{ {
return reinterpret_cast<D3DVideo*>(data)->overlay_full_screen(enable); return reinterpret_cast<D3DVideo*>(data)->overlay_full_screen(enable);
} }
static void d3d9_overlay_set_alpha(void *data, unsigned index, float mod) static void d3d_overlay_set_alpha(void *data, unsigned index, float mod)
{ {
return reinterpret_cast<D3DVideo*>(data)->overlay_set_alpha(index, mod); return reinterpret_cast<D3DVideo*>(data)->overlay_set_alpha(index, mod);
} }
static const video_overlay_interface_t d3d9_overlay_interface = { static const video_overlay_interface_t d3d_overlay_interface = {
d3d9_overlay_enable, d3d_overlay_enable,
d3d9_overlay_load, d3d_overlay_load,
d3d9_overlay_tex_geom, d3d_overlay_tex_geom,
d3d9_overlay_vertex_geom, d3d_overlay_vertex_geom,
d3d9_overlay_full_screen, d3d_overlay_full_screen,
d3d9_overlay_set_alpha, d3d_overlay_set_alpha,
}; };
static void d3d9_get_overlay_interface(void *data, const video_overlay_interface_t **iface) static void d3d_get_overlay_interface(void *data, const video_overlay_interface_t **iface)
{ {
(void)data; (void)data;
*iface = &d3d9_overlay_interface; *iface = &d3d_overlay_interface;
} }
#endif #endif
static void d3d9_set_aspect_ratio(void *data, unsigned aspect_ratio_idx) static void d3d_set_aspect_ratio(void *data, unsigned aspect_ratio_idx)
{ {
D3DVideo *d3d = reinterpret_cast<D3DVideo*>(data); D3DVideo *d3d = reinterpret_cast<D3DVideo*>(data);
@ -162,61 +162,61 @@ static void d3d9_set_aspect_ratio(void *data, unsigned aspect_ratio_idx)
return; return;
} }
static void d3d9_apply_state_changes(void *data) static void d3d_apply_state_changes(void *data)
{ {
D3DVideo *d3d = reinterpret_cast<D3DVideo*>(data); D3DVideo *d3d = reinterpret_cast<D3DVideo*>(data);
d3d->should_resize = true; d3d->should_resize = true;
} }
static void d3d9_set_osd_msg(void *data, const char *msg, void *userdata) static void d3d_set_osd_msg(void *data, const char *msg, void *userdata)
{ {
font_params_t *params = (font_params_t*)userdata; font_params_t *params = (font_params_t*)userdata;
reinterpret_cast<D3DVideo*>(data)->render_msg(msg, params); reinterpret_cast<D3DVideo*>(data)->render_msg(msg, params);
} }
static void d3d9_show_mouse(void *data, bool state) static void d3d_show_mouse(void *data, bool state)
{ {
reinterpret_cast<D3DVideo*>(data)->show_cursor(state); reinterpret_cast<D3DVideo*>(data)->show_cursor(state);
} }
#ifdef HAVE_MENU #ifdef HAVE_MENU
static void d3d9_set_rgui_texture_frame(void *data, static void d3d_set_rgui_texture_frame(void *data,
const void *frame, bool rgb32, unsigned width, unsigned height, const void *frame, bool rgb32, unsigned width, unsigned height,
float alpha) float alpha)
{ {
reinterpret_cast<D3DVideo*>(data)->set_rgui_texture_frame(frame, rgb32, width, height, alpha); reinterpret_cast<D3DVideo*>(data)->set_rgui_texture_frame(frame, rgb32, width, height, alpha);
} }
static void d3d9_set_rgui_texture_enable(void *data, bool state, bool full_screen) static void d3d_set_rgui_texture_enable(void *data, bool state, bool full_screen)
{ {
reinterpret_cast<D3DVideo*>(data)->set_rgui_texture_enable(state, full_screen); reinterpret_cast<D3DVideo*>(data)->set_rgui_texture_enable(state, full_screen);
} }
#endif #endif
static const video_poke_interface_t d3d9_poke_interface = { static const video_poke_interface_t d3d_poke_interface = {
NULL, NULL,
#ifdef HAVE_FBO #ifdef HAVE_FBO
NULL, NULL,
NULL, NULL,
#endif #endif
d3d9_set_aspect_ratio, d3d_set_aspect_ratio,
d3d9_apply_state_changes, d3d_apply_state_changes,
#ifdef HAVE_MENU #ifdef HAVE_MENU
d3d9_set_rgui_texture_frame, d3d_set_rgui_texture_frame,
d3d9_set_rgui_texture_enable, d3d_set_rgui_texture_enable,
#endif #endif
d3d9_set_osd_msg, d3d_set_osd_msg,
d3d9_show_mouse, d3d_show_mouse,
}; };
static void d3d9_get_poke_interface(void *data, const video_poke_interface_t **iface) static void d3d_get_poke_interface(void *data, const video_poke_interface_t **iface)
{ {
(void)data; (void)data;
*iface = &d3d9_poke_interface; *iface = &d3d_poke_interface;
} }
static void *d3d9_init(const video_info_t *info, const input_driver_t **input, static void *d3d_init(const video_info_t *info, const input_driver_t **input,
void **input_data) void **input_data)
{ {
D3DVideo *vid = new D3DVideo(info, input, input_data); D3DVideo *vid = new D3DVideo(info, input, input_data);
@ -230,23 +230,23 @@ static void *d3d9_init(const video_info_t *info, const input_driver_t **input,
return vid; return vid;
} }
const video_driver_t video_d3d9 = { const video_driver_t video_d3d = {
d3d9_init, d3d_init,
d3d9_frame, d3d_frame,
d3d9_set_nonblock_state, d3d_set_nonblock_state,
d3d9_alive, d3d_alive,
d3d9_focus, d3d_focus,
d3d9_set_shader, d3d_set_shader,
d3d9_free, d3d_free,
"d3d9", "d3d9",
#ifdef HAVE_MENU #ifdef HAVE_MENU
NULL, NULL,
#endif #endif
d3d9_set_rotation, d3d_set_rotation,
d3d9_viewport_info, d3d_viewport_info,
d3d9_read_viewport, d3d_read_viewport,
#ifdef HAVE_OVERLAY #ifdef HAVE_OVERLAY
d3d9_get_overlay_interface, d3d_get_overlay_interface,
#endif #endif
d3d9_get_poke_interface d3d_get_poke_interface
}; };

View File

@ -207,7 +207,7 @@
<ClCompile Include="..\..\frontend\menu\menu_common.c" /> <ClCompile Include="..\..\frontend\menu\menu_common.c" />
<ClCompile Include="..\..\frontend\menu\menu_settings.c" /> <ClCompile Include="..\..\frontend\menu\menu_settings.c" />
<ClCompile Include="..\..\frontend\menu\menu_context.c" /> <ClCompile Include="..\..\frontend\menu\menu_context.c" />
<ClCompile Include="..\..\gfx\d3d9\d3d9.cpp" /> <ClCompile Include="..\..\gfx\d3d9\d3d.cpp" />
<ClCompile Include="..\..\gfx\d3d9\d3d9_pc.cpp" /> <ClCompile Include="..\..\gfx\d3d9\d3d9_pc.cpp" />
<ClCompile Include="..\..\gfx\d3d9\render_chain.cpp" /> <ClCompile Include="..\..\gfx\d3d9\render_chain.cpp" />
<ClCompile Include="..\..\gfx\fonts\bitmapfont.c" /> <ClCompile Include="..\..\gfx\fonts\bitmapfont.c" />
@ -314,4 +314,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
</ImportGroup> </ImportGroup>
</Project> </Project>

View File

@ -89,7 +89,7 @@ const char *config_get_default_video(void)
case VIDEO_XDK_D3D: case VIDEO_XDK_D3D:
return "xdk_d3d"; return "xdk_d3d";
case VIDEO_D3D9: case VIDEO_D3D9:
return "d3d9"; return "d3d";
case VIDEO_PSP1: case VIDEO_PSP1:
return "psp1"; return "psp1";
case VIDEO_VITA: case VIDEO_VITA: