mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
BBox: Changed the rounding again, the old one fixed Paper Mario but had bugs in Mickey's Magical Mirror. This change fixes the glitches in both games.
Also fixed some compiler warnings.
This commit is contained in:
@ -556,7 +556,7 @@ void drawShadedTexQuad(ID3D11ShaderResourceView* texture,
|
||||
}
|
||||
|
||||
void drawShadedTexSubQuad(ID3D11ShaderResourceView* texture,
|
||||
const MathUtil::Rectangle<float>* rSource,
|
||||
const MathUtil::Rectangle<int>* rSource,
|
||||
int SourceWidth,
|
||||
int SourceHeight,
|
||||
const MathUtil::Rectangle<float>* rDest,
|
||||
|
@ -62,7 +62,7 @@ namespace D3D
|
||||
ID3D11InputLayout* layout,
|
||||
float Gamma = 1.0f);
|
||||
void drawShadedTexSubQuad(ID3D11ShaderResourceView* texture,
|
||||
const MathUtil::Rectangle<float>* rSource,
|
||||
const MathUtil::Rectangle<int>* rSource,
|
||||
int SourceWidth,
|
||||
int SourceHeight,
|
||||
const MathUtil::Rectangle<float>* rDest,
|
||||
|
@ -179,7 +179,7 @@ void FramebufferManager::GetTargetSize(unsigned int *width, unsigned int *height
|
||||
*height = targetSource.bottom - targetSource.top;
|
||||
}
|
||||
|
||||
void XFBSource::Draw(const MathUtil::Rectangle<float> &sourcerc,
|
||||
void XFBSource::Draw(const MathUtil::Rectangle<int> &sourcerc,
|
||||
const MathUtil::Rectangle<float> &drawrc) const
|
||||
{
|
||||
D3D::drawShadedTexSubQuad(tex->GetSRV(), &sourcerc,
|
||||
|
@ -50,7 +50,7 @@ struct XFBSource : public XFBSourceBase
|
||||
XFBSource(D3DTexture2D *_tex) : tex(_tex) {}
|
||||
~XFBSource() { tex->Release(); }
|
||||
|
||||
void Draw(const MathUtil::Rectangle<float> &sourcerc,
|
||||
void Draw(const MathUtil::Rectangle<int> &sourcerc,
|
||||
const MathUtil::Rectangle<float> &drawrc) const;
|
||||
void DecodeToTexture(u32 xfbAddr, u32 fbWidth, u32 fbHeight);
|
||||
void CopyEFB(float Gamma);
|
||||
|
@ -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<float> sourceRc;
|
||||
MathUtil::Rectangle<int> 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<float> drawRc;
|
||||
|
||||
|
@ -147,7 +147,7 @@ void Television::Render()
|
||||
// line down. We could even consider implementing a deinterlacing
|
||||
// algorithm.
|
||||
|
||||
MathUtil::Rectangle<float> sourceRc(0.f, 0.f, float(m_curWidth), float(m_curHeight));
|
||||
MathUtil::Rectangle<int> sourceRc(0, 0, int(m_curWidth), int(m_curHeight));
|
||||
MathUtil::Rectangle<float> destRc(-1.f, 1.f, 1.f, -1.f);
|
||||
|
||||
D3D::context->PSSetSamplers(0, 1, &m_samplerState);
|
||||
|
Reference in New Issue
Block a user