Skip to content

Commit

Permalink
Merge pull request #3846 from degasus/videosw
Browse files Browse the repository at this point in the history
VideoSW: Fix XFB config.
  • Loading branch information
degasus committed May 18, 2016
2 parents da3b03c + 3a452f3 commit 682af0a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Source/Core/DolphinWX/SoftwareVideoConfigDialog.cpp
Expand Up @@ -35,7 +35,7 @@ SoftwareVideoConfigDialog::SoftwareVideoConfigDialog(wxWindow* parent, const std
wxDialog(parent, wxID_ANY,
wxString(wxString::Format(_("Dolphin %s Graphics Configuration"), title)))
{
VideoConfig& vconfig = g_ActiveConfig;
VideoConfig& vconfig = g_Config;

if (File::Exists(File::GetUserPath(D_CONFIG_IDX) + "GFX.ini"))
vconfig.Load(File::GetUserPath(D_CONFIG_IDX) + "GFX.ini");
Expand Down Expand Up @@ -139,5 +139,5 @@ SoftwareVideoConfigDialog::SoftwareVideoConfigDialog(wxWindow* parent, const std

SoftwareVideoConfigDialog::~SoftwareVideoConfigDialog()
{
g_ActiveConfig.Save((File::GetUserPath(D_CONFIG_IDX) + "GFX.ini").c_str());
g_Config.Save((File::GetUserPath(D_CONFIG_IDX) + "GFX.ini").c_str());
}
3 changes: 0 additions & 3 deletions Source/Core/VideoBackends/Software/EfbCopy.cpp
Expand Up @@ -3,7 +3,6 @@
// Refer to the license.txt file included.

#include "Common/CommonTypes.h"
#include "Common/GL/GLInterfaceBase.h"
#include "Common/Logging/Log.h"
#include "Core/HW/Memmap.h"
#include "VideoBackends/Software/EfbCopy.h"
Expand All @@ -25,8 +24,6 @@ namespace EfbCopy
{
static void CopyToXfb(u32 xfbAddr, u32 fbWidth, u32 fbHeight, const EFBRectangle& sourceRc, float Gamma)
{
GLInterface->Update(); // update the render window position and the backbuffer size

INFO_LOG(VIDEO, "xfbaddr: %x, fbwidth: %i, fbheight: %i, source: (%i, %i, %i, %i), Gamma %f",
xfbAddr, fbWidth, fbHeight, sourceRc.top, sourceRc.left, sourceRc.bottom, sourceRc.right, Gamma);

Expand Down
4 changes: 4 additions & 0 deletions Source/Core/VideoBackends/Software/SWRenderer.cpp
Expand Up @@ -152,6 +152,10 @@ void SWRenderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight,
SWOGLWindow::s_instance->ShowImage(GetCurrentColorTexture(), fbWidth * 4, fbWidth, fbHeight, 1.0);

UpdateActiveConfig();

// virtual XFB is not supported
if (g_ActiveConfig.bUseXFB)
g_ActiveConfig.bUseRealXFB = true;
}

u32 SWRenderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 InputData)
Expand Down

0 comments on commit 682af0a

Please sign in to comment.