From 1ff4445ba07460c9688fe1c70d3fdf1149906094 Mon Sep 17 00:00:00 2001 From: Hans-Kristian Arntzen Date: Tue, 29 Mar 2016 15:28:13 +0200 Subject: [PATCH] Remove dead code with full_x/full_y. Very confusing and no longer serves any purpose anyways. --- gfx/common/gl_common.h | 2 -- gfx/common/vulkan_common.h | 1 - gfx/drivers/gl.c | 18 ++++++------------ gfx/drivers/vulkan.c | 19 ++++++------------- 4 files changed, 12 insertions(+), 28 deletions(-) diff --git a/gfx/common/gl_common.h b/gfx/common/gl_common.h index ad51d84b3b..e08423532e 100644 --- a/gfx/common/gl_common.h +++ b/gfx/common/gl_common.h @@ -223,8 +223,6 @@ typedef struct gl bool keep_aspect; unsigned rotation; - unsigned full_x, full_y; - struct video_viewport vp; unsigned vp_out_width; unsigned vp_out_height; diff --git a/gfx/common/vulkan_common.h b/gfx/common/vulkan_common.h index b54ad343fd..6a46bb84d1 100644 --- a/gfx/common/vulkan_common.h +++ b/gfx/common/vulkan_common.h @@ -259,7 +259,6 @@ typedef struct vk { vulkan_context_t *context; video_info_t video; - unsigned full_x, full_y; unsigned tex_w, tex_h; VkFormat tex_fmt; diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index 4738762c06..f06ca3763a 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -2660,6 +2660,7 @@ static void *gl_init(const video_info_t *video, const input_driver_t **input, vo gfx_ctx_mode_t mode; gfx_ctx_input_t inp; unsigned interval, mip_level; + unsigned full_x, full_y; video_shader_ctx_wrap_t wrap_info; video_shader_ctx_filter_t shader_filter; video_shader_ctx_info_t shader_info; @@ -2687,12 +2688,12 @@ static void *gl_init(const video_info_t *video, const input_driver_t **input, vo gfx_ctx_ctl(GFX_CTL_GET_VIDEO_SIZE, &mode); - gl->full_x = mode.width; - gl->full_y = mode.height; + full_x = mode.width; + full_y = mode.height; mode.width = 0; mode.height = 0; - RARCH_LOG("Detecting screen resolution %ux%u.\n", gl->full_x, gl->full_y); + RARCH_LOG("Detecting screen resolution %ux%u.\n", full_x, full_y); interval = video->vsync ? settings->video.swap_interval : 0; @@ -2703,8 +2704,8 @@ static void *gl_init(const video_info_t *video, const input_driver_t **input, vo if (video->fullscreen && (win_width == 0) && (win_height == 0)) { - win_width = gl->full_x; - win_height = gl->full_y; + win_width = full_x; + win_height = full_y; } mode.width = win_width; @@ -2763,13 +2764,6 @@ static void *gl_init(const video_info_t *video, const input_driver_t **input, vo RARCH_LOG("GL: Using resolution %ux%u\n", temp_width, temp_height); - if (gl->full_x || gl->full_y) - { - /* We got bogus from gfx_ctx_get_video_size. Replace. */ - gl->full_x = temp_width; - gl->full_y = temp_height; - } - video_driver_ctl(RARCH_DISPLAY_CTL_HW_CONTEXT_GET, &hwr); gl->vertex_ptr = hwr->bottom_left_origin diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c index e25b110a54..0ff5ff1fae 100644 --- a/gfx/drivers/vulkan.c +++ b/gfx/drivers/vulkan.c @@ -912,6 +912,7 @@ static void *vulkan_init(const video_info_t *video, gfx_ctx_mode_t mode; gfx_ctx_input_t inp; unsigned interval; + unsigned full_x, full_y; unsigned win_width; unsigned win_height; unsigned temp_width = 0; @@ -931,12 +932,12 @@ static void *vulkan_init(const video_info_t *video, gfx_ctx_ctl(GFX_CTL_SET, (void*)ctx_driver); gfx_ctx_ctl(GFX_CTL_GET_VIDEO_SIZE, &mode); - vk->full_x = mode.width; - vk->full_y = mode.height; + full_x = mode.width; + full_y = mode.height; mode.width = 0; mode.height = 0; - RARCH_LOG("Detecting screen resolution %ux%u.\n", vk->full_x, vk->full_y); + RARCH_LOG("Detecting screen resolution %ux%u.\n", full_x, full_y); interval = video->vsync ? settings->video.swap_interval : 0; gfx_ctx_ctl(GFX_CTL_SWAP_INTERVAL, &interval); @@ -945,8 +946,8 @@ static void *vulkan_init(const video_info_t *video, if (video->fullscreen && (win_width == 0) && (win_height == 0)) { - win_width = vk->full_x; - win_height = vk->full_y; + win_width = full_x; + win_height = full_y; } mode.width = win_width; @@ -965,14 +966,6 @@ static void *vulkan_init(const video_info_t *video, RARCH_LOG("Vulkan: Using resolution %ux%u\n", temp_width, temp_height); - /* FIXME: Is this check right? */ - if (vk->full_x || vk->full_y) - { - /* We got bogus from gfx_ctx_get_video_size. Replace. */ - vk->full_x = temp_width; - vk->full_y = temp_height; - } - gfx_ctx_ctl(GFX_CTL_GET_CONTEXT_DATA, &vk->context); vk->vsync = video->vsync;