From 3f72a7aefc0a6f554fc0ebdb85c0f97f548db818 Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Fri, 21 Mar 2014 12:42:37 +0700 Subject: [PATCH] Add reverse width and height to VIInfo. --- VI.cpp | 2 ++ VI.h | 1 + 2 files changed, 3 insertions(+) diff --git a/VI.cpp b/VI.cpp index 6005d0b5..7a36bb64 100644 --- a/VI.cpp +++ b/VI.cpp @@ -39,6 +39,8 @@ void VI_UpdateSize() if (VI.width == 0.0f) VI.width = *REG.VI_WIDTH; if (VI.height == 0.0f) VI.height = 240.0f; + VI.rwidth = 1.0f / VI.width; + VI.rheight = 1.0f / VI.height; } void VI_UpdateScreen() diff --git a/VI.h b/VI.h index 7927ef55..dfde13e5 100644 --- a/VI.h +++ b/VI.h @@ -5,6 +5,7 @@ struct VIInfo { u32 width, height, real_height; + f32 rwidth, rheight; u32 vStart, vEnd, vHeight; u32 lastOrigin;