(MSVC) Build fixes

This commit is contained in:
twinaphex 2015-02-14 06:09:45 +01:00
parent 64446ef497
commit 4b027ed975
2 changed files with 6 additions and 8 deletions

View File

@ -121,12 +121,10 @@ int database_info_write_rdl(const char *dir)
static char *bin_to_hex_alloc(const uint8_t *data, size_t len)
{
size_t i;
char *ret=malloc(len*2+1);
char *ret= (char*)malloc(len*2+1);
for (i = 0; i < len; i++)
{
snprintf(ret+i*2, 3, "%02X", data[i]);
}
return ret;
}

View File

@ -359,12 +359,12 @@ static void d3d_calculate_rect(d3d_video_t *d3d,
{
if (g_settings.video.aspect_ratio_idx == ASPECT_RATIO_CUSTOM)
{
const video_viewport_t &custom =
g_extern.console.screen.viewports.custom_vp;
const video_viewport_t *custom =
&g_extern.console.screen.viewports.custom_vp;
if (custom)
d3d_set_viewport(d3d, custom.x, custom.y,
custom.width, custom.height);
if (custom)
d3d_set_viewport(d3d, custom->x, custom->y,
custom->width, custom->height);
}
else
{