mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Get rid of some calls to video_driver_viewport_get_custom
This commit is contained in:
parent
2322e77795
commit
c8bf28842f
@ -122,7 +122,7 @@ static INLINE void ctr_set_screen_coords(ctr_video_t * ctr)
|
||||
}
|
||||
|
||||
|
||||
static void ctr_update_viewport(ctr_video_t* ctr)
|
||||
static void ctr_update_viewport(ctr_video_t* ctr, video_frame_info_t *video_info)
|
||||
{
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
@ -144,15 +144,10 @@ static void ctr_update_viewport(ctr_video_t* ctr)
|
||||
#if defined(HAVE_MENU)
|
||||
if (settings->uints.video_aspect_ratio_idx == ASPECT_RATIO_CUSTOM)
|
||||
{
|
||||
struct video_viewport *custom = video_viewport_get_custom();
|
||||
|
||||
if (custom)
|
||||
{
|
||||
x = custom->x;
|
||||
y = custom->y;
|
||||
width = custom->width;
|
||||
height = custom->height;
|
||||
}
|
||||
x = video_info->custom_vp_x;
|
||||
y = video_info->custom_vp_y;
|
||||
width = video_info->custom_vp_width;
|
||||
height = video_info->custom_vp_height;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
@ -611,7 +606,7 @@ static bool ctr_frame(void* data, const void* frame,
|
||||
fflush(stdout);
|
||||
|
||||
if (ctr->should_resize)
|
||||
ctr_update_viewport(ctr);
|
||||
ctr_update_viewport(ctr, video_info);
|
||||
|
||||
ctrGuSetMemoryFill(true, (u32*)ctr->drawbuffers.top.left, 0x00000000,
|
||||
(u32*)ctr->drawbuffers.top.left + 2 * CTR_TOP_FRAMEBUFFER_WIDTH * CTR_TOP_FRAMEBUFFER_HEIGHT,
|
||||
|
@ -713,19 +713,13 @@ static void psp_update_viewport(psp1_video_t* psp,
|
||||
}
|
||||
else if (psp->keep_aspect)
|
||||
{
|
||||
|
||||
#if defined(HAVE_MENU)
|
||||
if (settings->uints.video_aspect_ratio_idx == ASPECT_RATIO_CUSTOM)
|
||||
{
|
||||
struct video_viewport *custom = video_viewport_get_custom();
|
||||
|
||||
if (custom)
|
||||
{
|
||||
x = custom->x;
|
||||
y = custom->y;
|
||||
width = custom->width;
|
||||
height = custom->height;
|
||||
}
|
||||
x = video_info->custom_vp_x;
|
||||
y = video_info->custom_vp_y;
|
||||
width = video_info->custom_vp_width;
|
||||
height = video_info->custom_vp_height;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
@ -41,7 +41,6 @@
|
||||
|
||||
extern void *memcpy_neon(void *dst, const void *src, size_t n);
|
||||
|
||||
|
||||
static void vita2d_gfx_set_viewport(void *data, unsigned viewport_width,
|
||||
unsigned viewport_height, bool force_full, bool allow_rotate);
|
||||
|
||||
@ -186,7 +185,7 @@ static bool vita2d_gfx_frame(void *data, const void *frame,
|
||||
}
|
||||
|
||||
if (vita->should_resize)
|
||||
vita2d_gfx_update_viewport(vita);
|
||||
vita2d_gfx_update_viewport(vita, video_info);
|
||||
|
||||
vita2d_start_drawing();
|
||||
|
||||
@ -345,7 +344,8 @@ static void vita2d_set_projection(vita_video_t *vita,
|
||||
matrix_4x4_multiply(vita->mvp, rot, vita->mvp_no_rot);
|
||||
}
|
||||
|
||||
static void vita2d_gfx_update_viewport(vita_video_t* vita)
|
||||
static void vita2d_gfx_update_viewport(vita_video_t* vita,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
@ -374,15 +374,10 @@ static void vita2d_gfx_update_viewport(vita_video_t* vita)
|
||||
#if defined(HAVE_MENU)
|
||||
if (settings->uints.video_aspect_ratio_idx == ASPECT_RATIO_CUSTOM)
|
||||
{
|
||||
struct video_viewport *custom = video_viewport_get_custom();
|
||||
|
||||
if (custom)
|
||||
{
|
||||
x = custom->x;
|
||||
y = custom->y;
|
||||
width = custom->width;
|
||||
height = custom->height;
|
||||
}
|
||||
x = video_info->custom_vp_x;
|
||||
y = video_info->custom_vp_y;
|
||||
width = video_info->custom_vp_width;
|
||||
height = video_info->custom_vp_height;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user