new attempt at sizing the framebuffers, similar to what raven02 said

This commit is contained in:
Henrik Rydgard 2013-07-10 21:57:25 +02:00
parent 79470e0be4
commit 4c913c097e
2 changed files with 12 additions and 2 deletions

View File

@ -389,8 +389,13 @@ void GuessDrawingSize(int &drawing_width, int &drawing_height) {
drawing_width = 480;
drawing_height = 272;
} else {
drawing_width = std::min(drawing_width, 512);
drawing_height = std::min(drawing_height, 512);
// New attempt: Use the max of region and scissor. Round to even number as games are highly inconsistent .
int scissorX2 = (gstate.getScissorX2() + 1) & ~1;
int regionX2 = (gstate.getRegionX2() + 1) & ~1;
int scissorY2 = (gstate.getScissorY2() + 1) & ~1;
int regionY2 = (gstate.getRegionY2() + 1) & ~1;
drawing_width = std::min(512, std::max(scissorX2, regionX2));
drawing_height = std::min(512, std::max(scissorY2, regionY2));
}
}

View File

@ -226,6 +226,11 @@ struct GPUgstate
int getScissorX2() const { return scissor2 & 0x3FF; }
int getScissorY2() const { return (scissor2 >> 10) & 0x3FF; }
int getRegionX1() const { return region1 & 0x3FF; }
int getRegionY1() const { return (region1 >> 10) & 0x3FF; }
int getRegionX2() const { return (region2 & 0x3FF); }
int getRegionY2() const { return ((region2 >> 10) & 0x3FF); }
// Vertex type
bool isModeThrough() const { return (vertType & GE_VTYPE_THROUGH) != 0; }
int getNumBoneWeights() const {