mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
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 8743166663
.
This commit is contained in:
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user