Rename d3d_w32_font.cpp to d3d_w32_font.c

This commit is contained in:
twinaphex 2015-04-03 01:53:42 +02:00
parent 359715c667
commit 4a8f354fdc
3 changed files with 7 additions and 8 deletions

View File

@ -386,8 +386,7 @@ static void d3d_calculate_rect(d3d_video_t *d3d,
}
else
{
float device_aspect = static_cast<float>(width) /
static_cast<float>(height);
float device_aspect = ((float)width) / ((float)height);
if (fabsf(device_aspect - desired_aspect) < 0.0001f)
d3d_set_viewport(d3d, 0, 0, width, height);

View File

@ -47,11 +47,11 @@ static void *d3dfonts_w32_init_font(void *video_data,
(void)font_path;
r = static_cast<uint32_t>(settings->video.msg_color_r * 255) & 0xff;
g = static_cast<uint32_t>(settings->video.msg_color_g * 255) & 0xff;
b = static_cast<uint32_t>(settings->video.msg_color_b * 255) & 0xff;
r = (settings->video.msg_color_r * 255) & 0xff;
g = (settings->video.msg_color_g * 255) & 0xff;
b = (settings->video.msg_color_b * 255) & 0xff;
d3dfonts->d3d = (d3d_video_t*)video_data;
d3dfonts->d3d = (d3d_video_t*)video_data;
d3dfonts->color = D3DCOLOR_XRGB(r, g, b);
if (SUCCEEDED(D3DXCreateFontIndirect(d3dfonts->d3d->dev, &desc, &d3dfonts->font)))
@ -80,7 +80,7 @@ static void d3dfonts_w32_render_msg(void *data, const char *msg,
const void *userdata)
{
const struct font_params *params = (const struct font_params*)userdata;
d3dfonts_t *d3dfonts = (d3dfonts_t*)data;
d3dfonts_t *d3dfonts = (d3dfonts_t*)data;
if (!d3dfonts || !d3dfonts->d3d)
return;

View File

@ -266,7 +266,7 @@ FONTS
#endif
#if defined(HAVE_WIN32_D3D9)
#include "../gfx/drivers_font/d3d_w32_font.cpp"
#include "../gfx/drivers_font/d3d_w32_font.c"
#endif
#if defined(HAVE_LIBDBGFONT)