summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon
diff options
context:
space:
mode:
authorlioncash <mathew1900@hotmail.com>2013-01-16 15:46:11 -0500
committerlioncash <mathew1900@hotmail.com>2013-01-16 15:46:11 -0500
commit0ef3bd9c778a786ec439950f65c863d64ccf98b6 (patch)
tree35c0cc6e03cf45eeff2496b582d3720ad75defbe /Source/Core/VideoCommon
parent87431666639c7036ea0f5b0d499df639cefb3d51 (diff)
Revert "Made several variables/parameters unsigned in the DX9, DX11 and OGL plugins. They make more sense like this (given their names)."
Turns out I was wrong in my previous commit. My bad. This reverts commit 87431666639c7036ea0f5b0d499df639cefb3d51.
Diffstat (limited to 'Source/Core/VideoCommon')
-rw-r--r--Source/Core/VideoCommon/Src/FramebufferManagerBase.h2
-rw-r--r--Source/Core/VideoCommon/Src/RenderBase.cpp22
-rw-r--r--Source/Core/VideoCommon/Src/RenderBase.h24
3 files changed, 24 insertions, 24 deletions
diff --git a/Source/Core/VideoCommon/Src/FramebufferManagerBase.h b/Source/Core/VideoCommon/Src/FramebufferManagerBase.h
index 902e781a70..e529bb1a39 100644
--- a/Source/Core/VideoCommon/Src/FramebufferManagerBase.h
+++ b/Source/Core/VideoCommon/Src/FramebufferManagerBase.h
@@ -17,7 +17,7 @@ struct XFBSourceBase
// TODO: only DX9 uses the width/height params
virtual void Draw(const MathUtil::Rectangle<float> &sourcerc,
- const MathUtil::Rectangle<float> &drawrc, u32 width, u32 height) const = 0;
+ const MathUtil::Rectangle<float> &drawrc, int width, int height) const = 0;
virtual void DecodeToTexture(u32 xfbAddr, u32 fbWidth, u32 fbHeight) = 0;
diff --git a/Source/Core/VideoCommon/Src/RenderBase.cpp b/Source/Core/VideoCommon/Src/RenderBase.cpp
index 1ea7afbc1e..8e1d012fa2 100644
--- a/Source/Core/VideoCommon/Src/RenderBase.cpp
+++ b/Source/Core/VideoCommon/Src/RenderBase.cpp
@@ -60,12 +60,12 @@ std::string Renderer::s_sScreenshotName;
volatile bool Renderer::s_bScreenshot;
// The framebuffer size
-unsigned int Renderer::s_target_width;
-unsigned int Renderer::s_target_height;
+int Renderer::s_target_width;
+int Renderer::s_target_height;
// TODO: Add functionality to reinit all the render targets when the window is resized.
-unsigned int Renderer::s_backbuffer_width;
-unsigned int Renderer::s_backbuffer_height;
+int Renderer::s_backbuffer_width;
+int Renderer::s_backbuffer_height;
TargetRectangle Renderer::target_rc;
@@ -163,7 +163,7 @@ int Renderer::EFBToScaledY(int y)
};
}
-void Renderer::CalculateTargetScale(unsigned int x, unsigned int y, unsigned int &scaledX, unsigned int &scaledY)
+void Renderer::CalculateTargetScale(int x, int y, int &scaledX, int &scaledY)
{
if (g_ActiveConfig.iEFBScale == 0 || g_ActiveConfig.iEFBScale == 1)
{
@@ -172,15 +172,15 @@ void Renderer::CalculateTargetScale(unsigned int x, unsigned int y, unsigned int
}
else
{
- scaledX = x * (efb_scale_numeratorX / efb_scale_denominatorX);
- scaledY = y * (efb_scale_numeratorY / efb_scale_denominatorY);
+ scaledX = x * (int)efb_scale_numeratorX / (int)efb_scale_denominatorX;
+ scaledY = y * (int)efb_scale_numeratorY / (int)efb_scale_denominatorY;
}
}
// return true if target size changed
-bool Renderer::CalculateTargetSize(unsigned int framebuffer_width, unsigned int framebuffer_height, unsigned int multiplier)
+bool Renderer::CalculateTargetSize(unsigned int framebuffer_width, unsigned int framebuffer_height, int multiplier)
{
- u32 newEFBWidth, newEFBHeight;
+ int newEFBWidth, newEFBHeight;
// TODO: Ugly. Clean up
switch (s_LastEFBScale)
@@ -374,7 +374,7 @@ void Renderer::DrawDebugText()
// TODO: remove
extern bool g_aspect_wide;
-void Renderer::UpdateDrawRectangle(u32 backbuffer_width, u32 backbuffer_height)
+void Renderer::UpdateDrawRectangle(int backbuffer_width, int backbuffer_height)
{
float FloatGLWidth = (float)backbuffer_width;
float FloatGLHeight = (float)backbuffer_height;
@@ -492,7 +492,7 @@ void Renderer::UpdateDrawRectangle(u32 backbuffer_width, u32 backbuffer_height)
target_rc.bottom = YOffset + iHeight;
}
-void Renderer::SetWindowSize(u32 width, u32 height)
+void Renderer::SetWindowSize(int width, int height)
{
if (width < 1)
width = 1;
diff --git a/Source/Core/VideoCommon/Src/RenderBase.h b/Source/Core/VideoCommon/Src/RenderBase.h
index 38cab83562..5376577cbd 100644
--- a/Source/Core/VideoCommon/Src/RenderBase.h
+++ b/Source/Core/VideoCommon/Src/RenderBase.h
@@ -67,14 +67,14 @@ public:
virtual void RestoreState() = 0;
// Ideal internal resolution - determined by display resolution (automatic scaling) and/or a multiple of the native EFB resolution
- static u32 GetTargetWidth() { return s_target_width; }
- static u32 GetTargetHeight() { return s_target_height; }
+ static int GetTargetWidth() { return s_target_width; }
+ static int GetTargetHeight() { return s_target_height; }
// Display resolution
- static u32 GetBackbufferWidth() { return s_backbuffer_width; }
- static u32 GetBackbufferHeight() { return s_backbuffer_height; }
+ static int GetBackbufferWidth() { return s_backbuffer_width; }
+ static int GetBackbufferHeight() { return s_backbuffer_height; }
- static void SetWindowSize(u32 width, u32 height);
+ static void SetWindowSize(int width, int height);
// EFB coordinate conversion functions
@@ -82,7 +82,7 @@ public:
virtual TargetRectangle ConvertEFBRectangle(const EFBRectangle& rc) = 0;
static const TargetRectangle& GetTargetRectangle() { return target_rc; }
- static void UpdateDrawRectangle(u32 backbuffer_width, u32 backbuffer_height);
+ static void UpdateDrawRectangle(int backbuffer_width, int backbuffer_height);
// Use this to upscale native EFB coordinates to IDEAL internal resolution
@@ -132,8 +132,8 @@ public:
protected:
- static void CalculateTargetScale(unsigned int x, unsigned int y, unsigned int &scaledX, unsigned int &scaledY);
- static bool CalculateTargetSize(unsigned int framebuffer_width, unsigned int framebuffer_height, unsigned int multiplier = 1);
+ static void CalculateTargetScale(int x, int y, int &scaledX, int &scaledY);
+ static bool CalculateTargetSize(unsigned int framebuffer_width, unsigned int framebuffer_height, int multiplier = 1);
static void CheckFifoRecording();
static void RecordVideoMemory();
@@ -151,12 +151,12 @@ protected:
bool bLastFrameDumped;
// The framebuffer size
- static u32 s_target_width;
- static u32 s_target_height;
+ static int s_target_width;
+ static int s_target_height;
// TODO: Add functionality to reinit all the render targets when the window is resized.
- static u32 s_backbuffer_width;
- static u32 s_backbuffer_height;
+ static int s_backbuffer_width;
+ static int s_backbuffer_height;
static TargetRectangle target_rc;