video_viewport_get_custom will never be NULL

This commit is contained in:
twinaphex 2017-04-29 16:22:07 +02:00
parent 6d4ac23f26
commit 91abbdd4f1
5 changed files with 13 additions and 23 deletions

View File

@ -705,13 +705,10 @@ static void d3d_calculate_rect(void *data,
{ {
video_viewport_t *custom = video_viewport_get_custom(); video_viewport_t *custom = video_viewport_get_custom();
if (custom) *x = custom->x;
{ *y = custom->y;
*x = custom->x; *width = custom->width;
*y = custom->y; *height = custom->height;
*width = custom->width;
*height = custom->height;
}
} }
else else
#endif #endif

View File

@ -296,13 +296,10 @@ static void sdl_refresh_viewport(sdl2_video_t *vid)
const struct video_viewport *custom = const struct video_viewport *custom =
(const struct video_viewport*)video_viewport_get_custom(); (const struct video_viewport*)video_viewport_get_custom();
if (custom) vid->vp.x = custom->x;
{ vid->vp.y = custom->y;
vid->vp.x = custom->x; vid->vp.width = custom->width;
vid->vp.y = custom->y; vid->vp.height = custom->height;
vid->vp.width = custom->width;
vid->vp.height = custom->height;
}
} }
else if (vid->video.force_aspect) else if (vid->video.force_aspect)
{ {

View File

@ -471,7 +471,6 @@ static void vita2d_gfx_set_viewport(void *data, unsigned viewport_width,
{ {
const struct video_viewport *custom = video_viewport_get_custom(); const struct video_viewport *custom = video_viewport_get_custom();
/* Vukan has top-left origin viewport. */
x = custom->x; x = custom->x;
y = custom->y; y = custom->y;
viewport_width = custom->width; viewport_width = custom->width;

View File

@ -1391,7 +1391,7 @@ static void vulkan_set_viewport(void *data, unsigned viewport_width,
{ {
const struct video_viewport *custom = video_viewport_get_custom(); const struct video_viewport *custom = video_viewport_get_custom();
/* Vukan has top-left origin viewport. */ /* Vulkan has top-left origin viewport. */
x = custom->x; x = custom->x;
y = custom->y; y = custom->y;
viewport_width = custom->width; viewport_width = custom->width;

View File

@ -177,13 +177,10 @@ static void wiiu_gfx_update_viewport(wiiu_video_t* wiiu)
{ {
struct video_viewport *custom = video_viewport_get_custom(); struct video_viewport *custom = video_viewport_get_custom();
if (custom) x = custom->x;
{ y = custom->y;
x = custom->x; width = custom->width;
y = custom->y; height = custom->height;
width = custom->width;
height = custom->height;
}
} }
else else
#endif #endif