Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #642 from phire/vs-constants
VideoSoftware: Use the same max XFB size as VideoCommon.
  • Loading branch information
delroth committed Jul 18, 2014
2 parents c10674b + 2be83c1 commit 2fbdc03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Source/Core/VideoBackends/Software/EfbInterface.cpp
Expand Up @@ -558,7 +558,7 @@ namespace EfbInterface

// Like CopyToXFB, but we copy directly into the opengl colour texture without going via GameCube main memory or doing a yuyv conversion
void BypassXFB(u8* texture, u32 fbWidth, u32 fbHeight, const EFBRectangle& sourceRc, float Gamma) {
if (fbWidth*fbHeight > 640*568) {
if (fbWidth*fbHeight > MAX_XFB_WIDTH*MAX_XFB_HEIGHT) {
ERROR_LOG(VIDEO, "Framebuffer is too large: %ix%i", fbWidth, fbHeight);
return;
}
Expand Down
6 changes: 3 additions & 3 deletions Source/Core/VideoBackends/Software/SWRenderer.cpp
Expand Up @@ -86,8 +86,8 @@ static void CreateShaders()

void SWRenderer::Prepare()
{
s_xfbColorTexture[0] = new u8[640*568*4];
s_xfbColorTexture[1] = new u8[640*568*4];
s_xfbColorTexture[0] = new u8[MAX_XFB_WIDTH*MAX_XFB_HEIGHT*4];
s_xfbColorTexture[1] = new u8[MAX_XFB_WIDTH*MAX_XFB_HEIGHT*4];

s_currentColorTexture = 0;

Expand Down Expand Up @@ -166,7 +166,7 @@ void SWRenderer::swapColorTexture() {

void SWRenderer::UpdateColorTexture(EfbInterface::yuv422_packed *xfb, u32 fbWidth, u32 fbHeight)
{
if (fbWidth*fbHeight > 640*568) {
if (fbWidth*fbHeight > MAX_XFB_WIDTH*MAX_XFB_HEIGHT) {
ERROR_LOG(VIDEO, "Framebuffer is too large: %ix%i", fbWidth, fbHeight);
return;
}
Expand Down

0 comments on commit 2fbdc03

Please sign in to comment.