mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +00:00
(D3D8) Fix build
This commit is contained in:
parent
1ebe646198
commit
db550e6ffe
@ -1159,35 +1159,31 @@ static void d3d8_calculate_rect(void *data,
|
|||||||
bool force_full,
|
bool force_full,
|
||||||
bool allow_rotate)
|
bool allow_rotate)
|
||||||
{
|
{
|
||||||
|
struct video_viewport vp;
|
||||||
float device_aspect = (float)*width / *height;
|
float device_aspect = (float)*width / *height;
|
||||||
d3d8_video_t *d3d = (d3d8_video_t*)data;
|
d3d8_video_t *d3d = (d3d8_video_t*)data;
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
bool video_scale_integer = settings->bools.video_scale_integer;
|
bool video_scale_integer = settings->bools.video_scale_integer;
|
||||||
unsigned aspect_ratio_idx = settings->uints.video_aspect_ratio_idx;
|
unsigned aspect_ratio_idx = settings->uints.video_aspect_ratio_idx;
|
||||||
struct video_viewport vp;
|
|
||||||
|
|
||||||
video_driver_get_size(width, height);
|
video_driver_get_size(width, height);
|
||||||
|
|
||||||
vp.x = 0;
|
vp.x = 0;
|
||||||
vp.y = 0;
|
vp.y = 0;
|
||||||
vp.width = width;
|
vp.width = width;
|
||||||
vp.height = height;
|
vp.height = height;
|
||||||
vp.full_width = width;
|
vp.full_width = width;
|
||||||
vp.full_height = height;
|
vp.full_height = height;
|
||||||
|
|
||||||
if (video_scale_integer && !force_full)
|
if (video_scale_integer && !force_full)
|
||||||
{
|
|
||||||
video_viewport_get_scaled_integer(&vp,
|
video_viewport_get_scaled_integer(&vp,
|
||||||
*width,
|
*width,
|
||||||
*height,
|
*height,
|
||||||
video_driver_get_aspect_ratio(),
|
video_driver_get_aspect_ratio(),
|
||||||
d3d->keep_aspect,
|
d3d->keep_aspect,
|
||||||
true);
|
true);
|
||||||
}
|
|
||||||
else if (d3d->keep_aspect && !force_full)
|
else if (d3d->keep_aspect && !force_full)
|
||||||
{
|
video_viewport_get_scaled_aspect(&vp, *width, *height, true);
|
||||||
video_viewport_get_scaled_aspect(vp, viewport_width, viewport_height, true);
|
|
||||||
}
|
|
||||||
*x = vp.x;
|
*x = vp.x;
|
||||||
*y = vp.y;
|
*y = vp.y;
|
||||||
*width = vp.width;
|
*width = vp.width;
|
||||||
@ -1262,8 +1258,7 @@ static bool d3d8_initialize(d3d8_video_t *d3d, const video_info_t *info)
|
|||||||
IDirect3D8_Release(g_pD3D8);
|
IDirect3D8_Release(g_pD3D8);
|
||||||
g_pD3D8 = NULL;
|
g_pD3D8 = NULL;
|
||||||
|
|
||||||
ret = d3d8_init_base(d3d, info);
|
if ((ret = d3d8_init_base(d3d, info)))
|
||||||
if (ret)
|
|
||||||
RARCH_LOG("[D3D8]: Recovered from dead state.\n");
|
RARCH_LOG("[D3D8]: Recovered from dead state.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user