From 31138435e7b51810efc91dc8ea451d20948602f3 Mon Sep 17 00:00:00 2001 From: feos-tas Date: Fri, 15 Jul 2016 15:42:37 +0000 Subject: [PATCH] video: we all love hardcode for sure long live magic numbers --- trunk/src/drivers/win/video.cpp | 2 +- trunk/src/drivers/win/window.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/trunk/src/drivers/win/video.cpp b/trunk/src/drivers/win/video.cpp index 397548f2..b07a92ae 100644 --- a/trunk/src/drivers/win/video.cpp +++ b/trunk/src/drivers/win/video.cpp @@ -246,7 +246,7 @@ void recalculateBestFitRect(int width, int height) double screen_width = VNSWID_NU(xres); double screen_height = FSettings.TotalScanlines(); if (eoptions & EO_TVASPECT) - screen_width = ceil(screen_height * (screen_width / 256) * (tvAspectX / tvAspectY)); + screen_width = ceil(screen_height * (screen_width / xres) * (tvAspectX / tvAspectY)); int center_x = width / 2; int center_y = height / 2; diff --git a/trunk/src/drivers/win/window.cpp b/trunk/src/drivers/win/window.cpp index 45ac3e8d..05ec8aff 100644 --- a/trunk/src/drivers/win/window.cpp +++ b/trunk/src/drivers/win/window.cpp @@ -344,7 +344,7 @@ void CalcWindowSize(RECT *al) double screen_width = VNSWID_NU(xres); double screen_height = FSettings.TotalScanlines(); if (eoptions & EO_TVASPECT) - screen_width = ceil(screen_height * (screen_width / 256) * (tvAspectX / tvAspectY)); + screen_width = ceil(screen_height * (screen_width / xres) * (tvAspectX / tvAspectY)); al->left = 0; al->top = 0;