From 23ed63f33a6f9b138b1d3425a9f15ed886d75616 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 2 Oct 2016 20:37:14 +0200 Subject: [PATCH] move device_aspect variable --- gfx/drivers/ctr_gfx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gfx/drivers/ctr_gfx.c b/gfx/drivers/ctr_gfx.c index 5b1747e123..641f156345 100644 --- a/gfx/drivers/ctr_gfx.c +++ b/gfx/drivers/ctr_gfx.c @@ -121,12 +121,11 @@ static void ctr_update_viewport(ctr_video_t* ctr) { int x = 0; int y = 0; - float device_aspect = ((float)ctr->vp.full_width) / ctr->vp.full_height; float width = ctr->vp.full_width; float height = ctr->vp.full_height; settings_t *settings = config_get_ptr(); - float desired_aspect = video_driver_get_aspect_ratio(); + if(ctr->rotation & 0x1) desired_aspect = 1.0 / desired_aspect; @@ -154,6 +153,7 @@ static void ctr_update_viewport(ctr_video_t* ctr) #endif { float delta; + float device_aspect = ((float)ctr->vp.full_width) / ctr->vp.full_height; if (fabsf(device_aspect - desired_aspect) < 0.0001f) {