mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Minor cleanups.
This commit is contained in:
@ -313,7 +313,7 @@ void Renderer::DrawDebugText()
|
|||||||
|
|
||||||
void Renderer::CalculateXYScale(const TargetRectangle& dst_rect)
|
void Renderer::CalculateXYScale(const TargetRectangle& dst_rect)
|
||||||
{
|
{
|
||||||
if (g_ActiveConfig.bUseXFB && g_ActiveConfig.bUseRealXFB)
|
if (g_ActiveConfig.RealXFBEnabled())
|
||||||
{
|
{
|
||||||
xScale = 1.0f;
|
xScale = 1.0f;
|
||||||
yScale = 1.0f;
|
yScale = 1.0f;
|
||||||
|
@ -162,6 +162,12 @@ struct VideoConfig
|
|||||||
bool bSupportsFormatReinterpretation;
|
bool bSupportsFormatReinterpretation;
|
||||||
bool bSupportsPixelLighting;
|
bool bSupportsPixelLighting;
|
||||||
} backend_info;
|
} backend_info;
|
||||||
|
|
||||||
|
// Utility
|
||||||
|
bool RealXFBEnabled() const { return bUseXFB && bUseRealXFB; }
|
||||||
|
bool VirtualXFBEnabled() const { return bUseXFB && !bUseRealXFB; }
|
||||||
|
bool EFBCopiesToTextureEnabled() const { return bEFBCopyEnable && bCopyEFBToTexture; }
|
||||||
|
bool EFBCopiesToRamEnabled() const { return bEFBCopyEnable && !bCopyEFBToTexture; }
|
||||||
};
|
};
|
||||||
|
|
||||||
extern VideoConfig g_Config;
|
extern VideoConfig g_Config;
|
||||||
|
@ -898,7 +898,7 @@ void formatBufferDump(const char *in, char *out, int w, int h, int p)
|
|||||||
// This function has the final picture. We adjust the aspect ratio here.
|
// This function has the final picture. We adjust the aspect ratio here.
|
||||||
void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,const EFBRectangle& rc,float Gamma)
|
void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,const EFBRectangle& rc,float Gamma)
|
||||||
{
|
{
|
||||||
if (g_bSkipCurrentFrame || (!XFBWrited && (!g_ActiveConfig.bUseXFB || !g_ActiveConfig.bUseRealXFB)) || !fbWidth || !fbHeight)
|
if (g_bSkipCurrentFrame || (!XFBWrited && !g_ActiveConfig.RealXFBEnabled()) || !fbWidth || !fbHeight)
|
||||||
{
|
{
|
||||||
if (g_ActiveConfig.bDumpFrames && frame_data)
|
if (g_ActiveConfig.bDumpFrames && frame_data)
|
||||||
AVIDump::AddFrame(frame_data);
|
AVIDump::AddFrame(frame_data);
|
||||||
|
@ -831,7 +831,7 @@ bool Renderer::SaveScreenshot(const std::string &filename, const TargetRectangle
|
|||||||
// This function has the final picture. We adjust the aspect ratio here.
|
// This function has the final picture. We adjust the aspect ratio here.
|
||||||
void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,const EFBRectangle& rc,float Gamma)
|
void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,const EFBRectangle& rc,float Gamma)
|
||||||
{
|
{
|
||||||
if (g_bSkipCurrentFrame || (!XFBWrited && (!g_ActiveConfig.bUseXFB || !g_ActiveConfig.bUseRealXFB)) || !fbWidth || !fbHeight)
|
if (g_bSkipCurrentFrame || (!XFBWrited && !g_ActiveConfig.RealXFBEnabled()) || !fbWidth || !fbHeight)
|
||||||
{
|
{
|
||||||
if (g_ActiveConfig.bDumpFrames && frame_data)
|
if (g_ActiveConfig.bDumpFrames && frame_data)
|
||||||
AVIDump::AddFrame(frame_data);
|
AVIDump::AddFrame(frame_data);
|
||||||
|
@ -990,7 +990,7 @@ void Renderer::SetBlendMode(bool forceUpdate)
|
|||||||
void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,const EFBRectangle& rc,float Gamma)
|
void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,const EFBRectangle& rc,float Gamma)
|
||||||
{
|
{
|
||||||
static int w = 0, h = 0;
|
static int w = 0, h = 0;
|
||||||
if (g_bSkipCurrentFrame || (!XFBWrited && (!g_ActiveConfig.bUseXFB || !g_ActiveConfig.bUseRealXFB)) || !fbWidth || !fbHeight)
|
if (g_bSkipCurrentFrame || (!XFBWrited && !g_ActiveConfig.RealXFBEnabled()) || !fbWidth || !fbHeight)
|
||||||
{
|
{
|
||||||
if (g_ActiveConfig.bDumpFrames && frame_data)
|
if (g_ActiveConfig.bDumpFrames && frame_data)
|
||||||
{
|
{
|
||||||
@ -1010,7 +1010,7 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
|
|||||||
if (field == FIELD_LOWER) xfbAddr -= fbWidth * 2;
|
if (field == FIELD_LOWER) xfbAddr -= fbWidth * 2;
|
||||||
u32 xfbCount = 0;
|
u32 xfbCount = 0;
|
||||||
const XFBSourceBase* const* xfbSourceList = FramebufferManager::GetXFBSource(xfbAddr, fbWidth, fbHeight, xfbCount);
|
const XFBSourceBase* const* xfbSourceList = FramebufferManager::GetXFBSource(xfbAddr, fbWidth, fbHeight, xfbCount);
|
||||||
if ((!xfbSourceList || xfbCount == 0) && g_ActiveConfig.bUseXFB && !g_ActiveConfig.bUseRealXFB)
|
if (g_ActiveConfig.VirtualXFBEnabled() && (!xfbSourceList || xfbCount == 0))
|
||||||
{
|
{
|
||||||
if (g_ActiveConfig.bDumpFrames && frame_data)
|
if (g_ActiveConfig.bDumpFrames && frame_data)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user