diff --git a/Source/Core/VideoBackends/D3D/D3DUtil.cpp b/Source/Core/VideoBackends/D3D/D3DUtil.cpp index 687198b6a3..c64230f23d 100644 --- a/Source/Core/VideoBackends/D3D/D3DUtil.cpp +++ b/Source/Core/VideoBackends/D3D/D3DUtil.cpp @@ -556,7 +556,7 @@ void drawShadedTexQuad(ID3D11ShaderResourceView* texture, } void drawShadedTexSubQuad(ID3D11ShaderResourceView* texture, - const MathUtil::Rectangle* rSource, + const MathUtil::Rectangle* rSource, int SourceWidth, int SourceHeight, const MathUtil::Rectangle* rDest, diff --git a/Source/Core/VideoBackends/D3D/D3DUtil.h b/Source/Core/VideoBackends/D3D/D3DUtil.h index 6e47854164..ff789a1cb9 100644 --- a/Source/Core/VideoBackends/D3D/D3DUtil.h +++ b/Source/Core/VideoBackends/D3D/D3DUtil.h @@ -62,7 +62,7 @@ namespace D3D ID3D11InputLayout* layout, float Gamma = 1.0f); void drawShadedTexSubQuad(ID3D11ShaderResourceView* texture, - const MathUtil::Rectangle* rSource, + const MathUtil::Rectangle* rSource, int SourceWidth, int SourceHeight, const MathUtil::Rectangle* rDest, diff --git a/Source/Core/VideoBackends/D3D/FramebufferManager.cpp b/Source/Core/VideoBackends/D3D/FramebufferManager.cpp index e010068bce..726037a2f3 100644 --- a/Source/Core/VideoBackends/D3D/FramebufferManager.cpp +++ b/Source/Core/VideoBackends/D3D/FramebufferManager.cpp @@ -179,7 +179,7 @@ void FramebufferManager::GetTargetSize(unsigned int *width, unsigned int *height *height = targetSource.bottom - targetSource.top; } -void XFBSource::Draw(const MathUtil::Rectangle &sourcerc, +void XFBSource::Draw(const MathUtil::Rectangle &sourcerc, const MathUtil::Rectangle &drawrc) const { D3D::drawShadedTexSubQuad(tex->GetSRV(), &sourcerc, diff --git a/Source/Core/VideoBackends/D3D/FramebufferManager.h b/Source/Core/VideoBackends/D3D/FramebufferManager.h index abd2b27368..8327b0369c 100644 --- a/Source/Core/VideoBackends/D3D/FramebufferManager.h +++ b/Source/Core/VideoBackends/D3D/FramebufferManager.h @@ -50,7 +50,7 @@ struct XFBSource : public XFBSourceBase XFBSource(D3DTexture2D *_tex) : tex(_tex) {} ~XFBSource() { tex->Release(); } - void Draw(const MathUtil::Rectangle &sourcerc, + void Draw(const MathUtil::Rectangle &sourcerc, const MathUtil::Rectangle &drawrc) const; void DecodeToTexture(u32 xfbAddr, u32 fbWidth, u32 fbHeight); void CopyEFB(float Gamma); diff --git a/Source/Core/VideoBackends/D3D/Render.cpp b/Source/Core/VideoBackends/D3D/Render.cpp index 52448e4f3f..ee6814deb7 100644 --- a/Source/Core/VideoBackends/D3D/Render.cpp +++ b/Source/Core/VideoBackends/D3D/Render.cpp @@ -791,12 +791,12 @@ void Renderer::Swap(u32 xfbAddr, u32 fbWidth, u32 fbHeight,const EFBRectangle& r for (u32 i = 0; i < xfbCount; ++i) { xfbSource = xfbSourceList[i]; - MathUtil::Rectangle sourceRc; + MathUtil::Rectangle sourceRc; sourceRc.left = 0; sourceRc.top = 0; - sourceRc.right = (float)xfbSource->texWidth; - sourceRc.bottom = (float)xfbSource->texHeight; + sourceRc.right = (int)xfbSource->texWidth; + sourceRc.bottom = (int)xfbSource->texHeight; MathUtil::Rectangle drawRc; diff --git a/Source/Core/VideoBackends/D3D/Television.cpp b/Source/Core/VideoBackends/D3D/Television.cpp index 029ba9ce9f..0f1cf62cf0 100644 --- a/Source/Core/VideoBackends/D3D/Television.cpp +++ b/Source/Core/VideoBackends/D3D/Television.cpp @@ -147,7 +147,7 @@ void Television::Render() // line down. We could even consider implementing a deinterlacing // algorithm. - MathUtil::Rectangle sourceRc(0.f, 0.f, float(m_curWidth), float(m_curHeight)); + MathUtil::Rectangle sourceRc(0, 0, int(m_curWidth), int(m_curHeight)); MathUtil::Rectangle destRc(-1.f, 1.f, 1.f, -1.f); D3D::context->PSSetSamplers(0, 1, &m_samplerState); diff --git a/Source/Core/VideoBackends/OGL/FramebufferManager.cpp b/Source/Core/VideoBackends/OGL/FramebufferManager.cpp index 7984b5ee74..d2169a7c91 100644 --- a/Source/Core/VideoBackends/OGL/FramebufferManager.cpp +++ b/Source/Core/VideoBackends/OGL/FramebufferManager.cpp @@ -394,13 +394,13 @@ XFBSource::~XFBSource() } -void XFBSource::Draw(const MathUtil::Rectangle &sourcerc, +void XFBSource::Draw(const MathUtil::Rectangle &sourcerc, const MathUtil::Rectangle &drawrc) const { // Texture map xfbSource->texture onto the main buffer glFramebufferTexture2D(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, texture, 0); glBlitFramebuffer(sourcerc.left, sourcerc.bottom, sourcerc.right, sourcerc.top, - drawrc.left, drawrc.bottom, drawrc.right, drawrc.top, + (int)drawrc.left, (int)drawrc.bottom, (int)drawrc.right, (int)drawrc.top, GL_COLOR_BUFFER_BIT, GL_LINEAR); GL_REPORT_ERRORD(); diff --git a/Source/Core/VideoBackends/OGL/FramebufferManager.h b/Source/Core/VideoBackends/OGL/FramebufferManager.h index 9fbcdbfedd..3d67bff610 100644 --- a/Source/Core/VideoBackends/OGL/FramebufferManager.h +++ b/Source/Core/VideoBackends/OGL/FramebufferManager.h @@ -51,7 +51,7 @@ struct XFBSource : public XFBSourceBase void CopyEFB(float Gamma) override; void DecodeToTexture(u32 xfbAddr, u32 fbWidth, u32 fbHeight) override; - void Draw(const MathUtil::Rectangle &sourcerc, + void Draw(const MathUtil::Rectangle &sourcerc, const MathUtil::Rectangle &drawrc) const override; const GLuint texture; diff --git a/Source/Core/VideoBackends/OGL/Render.cpp b/Source/Core/VideoBackends/OGL/Render.cpp index 809b3684d3..63edc4cd21 100644 --- a/Source/Core/VideoBackends/OGL/Render.cpp +++ b/Source/Core/VideoBackends/OGL/Render.cpp @@ -1352,7 +1352,7 @@ void Renderer::Swap(u32 xfbAddr, u32 fbWidth, u32 fbHeight,const EFBRectangle& r // Tell the OSD Menu about the current internal resolution OSDInternalW = xfbSource->sourceRc.GetWidth(); OSDInternalH = xfbSource->sourceRc.GetHeight(); - MathUtil::Rectangle sourceRc; + MathUtil::Rectangle sourceRc; sourceRc.left = xfbSource->sourceRc.left; sourceRc.right = xfbSource->sourceRc.right; sourceRc.top = xfbSource->sourceRc.top; diff --git a/Source/Core/VideoCommon/DriverDetails.cpp b/Source/Core/VideoCommon/DriverDetails.cpp index 37b5c3cb3b..0439c80a4c 100644 --- a/Source/Core/VideoCommon/DriverDetails.cpp +++ b/Source/Core/VideoCommon/DriverDetails.cpp @@ -34,7 +34,7 @@ namespace DriverDetails Vendor m_vendor = VENDOR_UNKNOWN; Driver m_driver = DRIVER_UNKNOWN; - s32 m_family = 0.0; + s32 m_family = 0; double m_version = 0.0; // This is a list of all known bugs for each vendor diff --git a/Source/Core/VideoCommon/FramebufferManagerBase.h b/Source/Core/VideoCommon/FramebufferManagerBase.h index 2680f0ced4..e065a4a56b 100644 --- a/Source/Core/VideoCommon/FramebufferManagerBase.h +++ b/Source/Core/VideoCommon/FramebufferManagerBase.h @@ -15,7 +15,7 @@ struct XFBSourceBase { virtual ~XFBSourceBase() {} - virtual void Draw(const MathUtil::Rectangle &sourcerc, + virtual void Draw(const MathUtil::Rectangle &sourcerc, const MathUtil::Rectangle &drawrc) const = 0; virtual void DecodeToTexture(u32 xfbAddr, u32 fbWidth, u32 fbHeight) = 0; diff --git a/Source/Core/VideoCommon/VertexLoader.cpp b/Source/Core/VideoCommon/VertexLoader.cpp index 2f8559bebb..45bfec384a 100644 --- a/Source/Core/VideoCommon/VertexLoader.cpp +++ b/Source/Core/VideoCommon/VertexLoader.cpp @@ -254,8 +254,8 @@ void LOADERDECL UpdateBoundingBox() } // Convert to screen space and add the point to the list - round like the real hardware - s_bbox_points[s_bbox_currPoint].x = (((s32) (0.5f + (16.0f * (screenPoint[0] * xfregs.viewport.wd + (xfregs.viewport.xOrig - 342.0f))))) - 9) >> 4; - s_bbox_points[s_bbox_currPoint].y = (((s32) (0.5f + (16.0f * (screenPoint[1] * xfregs.viewport.ht + (xfregs.viewport.yOrig - 342.0f))))) - 9) >> 4; + s_bbox_points[s_bbox_currPoint].x = (((s32) (0.5f + (16.0f * (screenPoint[0] * xfregs.viewport.wd + (xfregs.viewport.xOrig - 342.0f))))) + 3) >> 4; + s_bbox_points[s_bbox_currPoint].y = (((s32) (0.5f + (16.0f * (screenPoint[1] * xfregs.viewport.ht + (xfregs.viewport.yOrig - 342.0f))))) + 3) >> 4; s_bbox_points[s_bbox_currPoint].z = screenPoint[2]; // Update point list for primitive