diff options
| author | Scott Mansell <phiren@gmail.com> | 2014-07-17 22:39:09 +1200 |
|---|---|---|
| committer | Scott Mansell <phiren@gmail.com> | 2014-07-17 22:39:09 +1200 |
| commit | 2be83c13be5c26cbf990cbcf844cc9b4952d9c5d (patch) | |
| tree | 5f16c8f7c9a0b2cce3b2e7cd416d4b39755a22c7 /Source/Core/VideoBackends | |
| parent | 705afc70b6346081193dbe295abb6f5ceb2e5b79 (diff) | |
VideoSoftware: Use the same max XFB size as VideoCommon.
And lets just use the same constant as videocommon, so if it ever
increases (again) VideoSoftware will be automatically updated.
Diffstat (limited to 'Source/Core/VideoBackends')
| -rw-r--r-- | Source/Core/VideoBackends/Software/EfbInterface.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/VideoBackends/Software/SWRenderer.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/VideoBackends/Software/EfbInterface.cpp b/Source/Core/VideoBackends/Software/EfbInterface.cpp index aabbee0607..bf405860bf 100644 --- a/Source/Core/VideoBackends/Software/EfbInterface.cpp +++ b/Source/Core/VideoBackends/Software/EfbInterface.cpp @@ -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; } diff --git a/Source/Core/VideoBackends/Software/SWRenderer.cpp b/Source/Core/VideoBackends/Software/SWRenderer.cpp index fba685370c..f94fad595a 100644 --- a/Source/Core/VideoBackends/Software/SWRenderer.cpp +++ b/Source/Core/VideoBackends/Software/SWRenderer.cpp @@ -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; @@ -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; } |
