mirror of https://github.com/PCSX2/pcsx2.git
GSdx: this should fix d3d9 mode and the aspect ratio bug
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1191 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
667581e4be
commit
a1507e6044
|
@ -28,7 +28,7 @@
|
||||||
#include "GSLocalMemory.h"
|
#include "GSLocalMemory.h"
|
||||||
|
|
||||||
#define ASSERT_BLOCK(r, w, h) \
|
#define ASSERT_BLOCK(r, w, h) \
|
||||||
ASSERT((r).Width() >= w && (r).Height() >= h && !((r).left&(w-1)) && !((r).top&(h-1)) && !((r).right&(w-1)) && !((r).bottom&(h-1))); \
|
ASSERT((r).width() >= w && (r).height() >= h && !((r).left&(w-1)) && !((r).top&(h-1)) && !((r).right&(w-1)) && !((r).bottom&(h-1))); \
|
||||||
|
|
||||||
#define FOREACH_BLOCK_START(w, h, bpp) \
|
#define FOREACH_BLOCK_START(w, h, bpp) \
|
||||||
uint32 bp = TEX0.TBP0; \
|
uint32 bp = TEX0.TBP0; \
|
||||||
|
|
|
@ -94,7 +94,10 @@ bool GSTexture9::Update(const GSVector4i& r, const void* data, int pitch)
|
||||||
uint8* src = (uint8*)data;
|
uint8* src = (uint8*)data;
|
||||||
uint8* dst = (uint8*)lr.pBits;
|
uint8* dst = (uint8*)lr.pBits;
|
||||||
|
|
||||||
int bytes = min(pitch, lr.Pitch);
|
int bytes = r.width() << (m_desc.Format == D3DFMT_A1R5G5B5 ? 1 : 2);
|
||||||
|
|
||||||
|
bytes = min(bytes, pitch);
|
||||||
|
bytes = min(bytes, lr.Pitch);
|
||||||
|
|
||||||
for(int i = 0, j = r.height(); i < j; i++, src += pitch, dst += lr.Pitch)
|
for(int i = 0, j = r.height(); i < j; i++, src += pitch, dst += lr.Pitch)
|
||||||
{
|
{
|
||||||
|
|
|
@ -224,7 +224,8 @@ public:
|
||||||
m_valid = m_valid.runion(r);
|
m_valid = m_valid.runion(r);
|
||||||
|
|
||||||
static uint8* bits = (uint8*)::_aligned_malloc(1024 * 1024 * 4, 16);
|
static uint8* bits = (uint8*)::_aligned_malloc(1024 * 1024 * 4, 16);
|
||||||
static int pitch = 1024 * 4;
|
|
||||||
|
int pitch = ((r.width() + 3) & ~3) * 4;
|
||||||
|
|
||||||
if(m_renderer->m_psrr)
|
if(m_renderer->m_psrr)
|
||||||
{
|
{
|
||||||
|
|
|
@ -58,7 +58,7 @@ GSVector4i GSVector4i::fit(int arx, int ary) const
|
||||||
|
|
||||||
if(w * ary > h * arx)
|
if(w * ary > h * arx)
|
||||||
{
|
{
|
||||||
int w2 = w * arx / ary;
|
int w2 = h * arx / ary;
|
||||||
r.left = (r.left + r.right - w2) >> 1;
|
r.left = (r.left + r.right - w2) >> 1;
|
||||||
if(r.left & 1) r.left++;
|
if(r.left & 1) r.left++;
|
||||||
r.right = r.left + w2;
|
r.right = r.left + w2;
|
||||||
|
|
Loading…
Reference in New Issue