mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-11 00:29:11 +01:00
8b2c540544
This adds xfb support to the videosoftware backend, which increases it's accuracy and more imporantly, enables the usage of many homebrew apps which write directly to the xfb on the videosoftware backend. Conflicts: Source/Core/VideoBackends/Software/SWRenderer.cpp Source/Core/VideoBackends/Software/SWmain.cpp
88 lines
2.4 KiB
C++
88 lines
2.4 KiB
C++
// Copyright 2013 Dolphin Emulator Project
|
|
// Licensed under GPLv2
|
|
// Refer to the license.txt file included.
|
|
|
|
#include "FileUtil.h"
|
|
#include "IniFile.h"
|
|
#include "SWVideoConfig.h"
|
|
|
|
SWVideoConfig g_SWVideoConfig;
|
|
|
|
SWVideoConfig::SWVideoConfig()
|
|
{
|
|
bFullscreen = false;
|
|
bHideCursor = false;
|
|
renderToMainframe = false;
|
|
|
|
bHwRasterizer = false;
|
|
bBypassXFB = false;
|
|
|
|
bShowStats = false;
|
|
|
|
bDumpTextures = false;
|
|
bDumpObjects = false;
|
|
bDumpFrames = false;
|
|
|
|
bZComploc = true;
|
|
bZFreeze = true;
|
|
|
|
bDumpTevStages = false;
|
|
bDumpTevTextureFetches = false;
|
|
|
|
drawStart = 0;
|
|
drawEnd = 100000;
|
|
}
|
|
|
|
void SWVideoConfig::Load(const char* ini_file)
|
|
{
|
|
IniFile iniFile;
|
|
iniFile.Load(ini_file);
|
|
|
|
iniFile.Get("Hardware", "Fullscreen", &bFullscreen, 0); // Hardware
|
|
iniFile.Get("Hardware", "RenderToMainframe", &renderToMainframe, false);
|
|
|
|
iniFile.Get("Rendering", "HwRasterizer", &bHwRasterizer, false);
|
|
iniFile.Get("Rendering", "BypassXFB", &bBypassXFB, false);
|
|
iniFile.Get("Rendering", "ZComploc", &bZComploc, true);
|
|
iniFile.Get("Rendering", "ZFreeze", &bZFreeze, true);
|
|
|
|
iniFile.Get("Info", "ShowStats", &bShowStats, false);
|
|
|
|
iniFile.Get("Utility", "DumpTexture", &bDumpTextures, false);
|
|
iniFile.Get("Utility", "DumpObjects", &bDumpObjects, false);
|
|
iniFile.Get("Utility", "DumpFrames", &bDumpFrames, false);
|
|
iniFile.Get("Utility", "DumpTevStages", &bDumpTevStages, false);
|
|
iniFile.Get("Utility", "DumpTevTexFetches", &bDumpTevTextureFetches, false);
|
|
|
|
iniFile.Get("Misc", "DrawStart", &drawStart, 0);
|
|
iniFile.Get("Misc", "DrawEnd", &drawEnd, 100000);
|
|
}
|
|
|
|
void SWVideoConfig::Save(const char* ini_file)
|
|
{
|
|
IniFile iniFile;
|
|
iniFile.Load(ini_file);
|
|
|
|
iniFile.Set("Hardware", "Fullscreen", bFullscreen);
|
|
iniFile.Set("Hardware", "RenderToMainframe", renderToMainframe);
|
|
|
|
iniFile.Set("Rendering", "HwRasterizer", bHwRasterizer);
|
|
iniFile.Set("Rendering", "BypassXFB", bBypassXFB);
|
|
iniFile.Set("Rendering", "ZComploc", bZComploc);
|
|
iniFile.Set("Rendering", "ZFreeze", bZFreeze);
|
|
|
|
iniFile.Set("Info", "ShowStats", bShowStats);
|
|
|
|
iniFile.Set("Utility", "DumpTexture", bDumpTextures);
|
|
iniFile.Set("Utility", "DumpObjects", bDumpObjects);
|
|
iniFile.Set("Utility", "DumpFrames", bDumpFrames);
|
|
iniFile.Set("Utility", "DumpTevStages", bDumpTevStages);
|
|
iniFile.Set("Utility", "DumpTevTexFetches", bDumpTevTextureFetches);
|
|
|
|
iniFile.Set("Misc", "DrawStart", drawStart);
|
|
iniFile.Set("Misc", "DrawEnd", drawEnd);
|
|
|
|
iniFile.Save(ini_file);
|
|
}
|
|
|