diff --git a/gfx/drivers/d3d.cpp b/gfx/drivers/d3d.cpp index d77858e590..c83a75fb9b 100644 --- a/gfx/drivers/d3d.cpp +++ b/gfx/drivers/d3d.cpp @@ -705,13 +705,10 @@ static void d3d_calculate_rect(void *data, { video_viewport_t *custom = video_viewport_get_custom(); - if (custom) - { - *x = custom->x; - *y = custom->y; - *width = custom->width; - *height = custom->height; - } + *x = custom->x; + *y = custom->y; + *width = custom->width; + *height = custom->height; } else #endif diff --git a/gfx/drivers/sdl2_gfx.c b/gfx/drivers/sdl2_gfx.c index 45dd68f203..1585460dad 100644 --- a/gfx/drivers/sdl2_gfx.c +++ b/gfx/drivers/sdl2_gfx.c @@ -296,13 +296,10 @@ static void sdl_refresh_viewport(sdl2_video_t *vid) const struct video_viewport *custom = (const struct video_viewport*)video_viewport_get_custom(); - if (custom) - { - vid->vp.x = custom->x; - vid->vp.y = custom->y; - vid->vp.width = custom->width; - vid->vp.height = custom->height; - } + vid->vp.x = custom->x; + vid->vp.y = custom->y; + vid->vp.width = custom->width; + vid->vp.height = custom->height; } else if (vid->video.force_aspect) { diff --git a/gfx/drivers/vita2d_gfx.c b/gfx/drivers/vita2d_gfx.c index 6379cc688a..3553f8d6cb 100644 --- a/gfx/drivers/vita2d_gfx.c +++ b/gfx/drivers/vita2d_gfx.c @@ -471,7 +471,6 @@ static void vita2d_gfx_set_viewport(void *data, unsigned viewport_width, { const struct video_viewport *custom = video_viewport_get_custom(); - /* Vukan has top-left origin viewport. */ x = custom->x; y = custom->y; viewport_width = custom->width; diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c index 20b104adce..4740355ffd 100644 --- a/gfx/drivers/vulkan.c +++ b/gfx/drivers/vulkan.c @@ -1391,7 +1391,7 @@ static void vulkan_set_viewport(void *data, unsigned viewport_width, { const struct video_viewport *custom = video_viewport_get_custom(); - /* Vukan has top-left origin viewport. */ + /* Vulkan has top-left origin viewport. */ x = custom->x; y = custom->y; viewport_width = custom->width; diff --git a/gfx/drivers/wiiu_gfx.c b/gfx/drivers/wiiu_gfx.c index 89a05bc68b..d80c0e3b56 100644 --- a/gfx/drivers/wiiu_gfx.c +++ b/gfx/drivers/wiiu_gfx.c @@ -177,13 +177,10 @@ static void wiiu_gfx_update_viewport(wiiu_video_t* wiiu) { struct video_viewport *custom = video_viewport_get_custom(); - if (custom) - { - x = custom->x; - y = custom->y; - width = custom->width; - height = custom->height; - } + x = custom->x; + y = custom->y; + width = custom->width; + height = custom->height; } else #endif