VideoBackend: Get rid of a boolean global
Also gets rid of global headers
This commit is contained in:
parent
066af14272
commit
01f99a04a2
|
@ -8,6 +8,7 @@
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include "Common/Common.h"
|
||||||
#include "Common/CommonTypes.h"
|
#include "Common/CommonTypes.h"
|
||||||
#include "Common/FileUtil.h"
|
#include "Common/FileUtil.h"
|
||||||
|
|
||||||
|
|
|
@ -23,12 +23,10 @@
|
||||||
#include "Common/FileUtil.h"
|
#include "Common/FileUtil.h"
|
||||||
#include "Common/SysConf.h"
|
#include "Common/SysConf.h"
|
||||||
#include "Core/ConfigManager.h"
|
#include "Core/ConfigManager.h"
|
||||||
#include "Core/Core.h"
|
|
||||||
#include "DolphinWX/Frame.h"
|
#include "DolphinWX/Frame.h"
|
||||||
#include "DolphinWX/Main.h"
|
#include "DolphinWX/Main.h"
|
||||||
#include "DolphinWX/VideoConfigDiag.h"
|
#include "DolphinWX/VideoConfigDiag.h"
|
||||||
#include "DolphinWX/WxUtils.h"
|
#include "DolphinWX/WxUtils.h"
|
||||||
#include "VideoBackends/OGL/main.h"
|
|
||||||
#include "VideoCommon/PostProcessing.h"
|
#include "VideoCommon/PostProcessing.h"
|
||||||
#include "VideoCommon/VideoBackendBase.h"
|
#include "VideoCommon/VideoBackendBase.h"
|
||||||
#include "VideoCommon/VideoConfig.h"
|
#include "VideoCommon/VideoConfig.h"
|
||||||
|
|
|
@ -66,8 +66,6 @@
|
||||||
<ClInclude Include="D3DUtil.h" />
|
<ClInclude Include="D3DUtil.h" />
|
||||||
<ClInclude Include="FramebufferManager.h" />
|
<ClInclude Include="FramebufferManager.h" />
|
||||||
<ClInclude Include="GeometryShaderCache.h" />
|
<ClInclude Include="GeometryShaderCache.h" />
|
||||||
<ClInclude Include="Globals.h" />
|
|
||||||
<ClInclude Include="main.h" />
|
|
||||||
<ClInclude Include="PerfQuery.h" />
|
<ClInclude Include="PerfQuery.h" />
|
||||||
<ClInclude Include="PixelShaderCache.h" />
|
<ClInclude Include="PixelShaderCache.h" />
|
||||||
<ClInclude Include="PSTextureEncoder.h" />
|
<ClInclude Include="PSTextureEncoder.h" />
|
||||||
|
|
|
@ -123,8 +123,6 @@
|
||||||
<ClInclude Include="XFBEncoder.h">
|
<ClInclude Include="XFBEncoder.h">
|
||||||
<Filter>Render</Filter>
|
<Filter>Render</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="Globals.h" />
|
|
||||||
<ClInclude Include="main.h" />
|
|
||||||
<ClInclude Include="VideoBackend.h" />
|
<ClInclude Include="VideoBackend.h" />
|
||||||
<ClInclude Include="BoundingBox.h">
|
<ClInclude Include="BoundingBox.h">
|
||||||
<Filter>Render</Filter>
|
<Filter>Render</Filter>
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
#include "VideoBackends/D3D/D3DShader.h"
|
#include "VideoBackends/D3D/D3DShader.h"
|
||||||
#include "VideoBackends/D3D/FramebufferManager.h"
|
#include "VideoBackends/D3D/FramebufferManager.h"
|
||||||
#include "VideoBackends/D3D/GeometryShaderCache.h"
|
#include "VideoBackends/D3D/GeometryShaderCache.h"
|
||||||
#include "VideoBackends/D3D/Globals.h"
|
|
||||||
|
|
||||||
#include "VideoCommon/Debugger.h"
|
#include "VideoCommon/Debugger.h"
|
||||||
#include "VideoCommon/GeometryShaderGen.h"
|
#include "VideoCommon/GeometryShaderGen.h"
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
// Copyright 2008 Dolphin Emulator Project
|
|
||||||
// Licensed under GPLv2+
|
|
||||||
// Refer to the license.txt file included.
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "Common/Common.h"
|
|
||||||
|
|
||||||
#include "VideoBackends/D3D/main.h"
|
|
||||||
|
|
||||||
#include "VideoCommon/VideoCommon.h"
|
|
||||||
#include "VideoCommon/VideoConfig.h"
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include "Common/CommonTypes.h"
|
||||||
#include "Common/FileUtil.h"
|
#include "Common/FileUtil.h"
|
||||||
#include "Common/LinearDiskCache.h"
|
#include "Common/LinearDiskCache.h"
|
||||||
#include "Common/StringUtil.h"
|
#include "Common/StringUtil.h"
|
||||||
|
@ -12,7 +13,6 @@
|
||||||
|
|
||||||
#include "VideoBackends/D3D/D3DBase.h"
|
#include "VideoBackends/D3D/D3DBase.h"
|
||||||
#include "VideoBackends/D3D/D3DShader.h"
|
#include "VideoBackends/D3D/D3DShader.h"
|
||||||
#include "VideoBackends/D3D/Globals.h"
|
|
||||||
#include "VideoBackends/D3D/PixelShaderCache.h"
|
#include "VideoBackends/D3D/PixelShaderCache.h"
|
||||||
|
|
||||||
#include "VideoCommon/Debugger.h"
|
#include "VideoCommon/Debugger.h"
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
// Licensed under GPLv2+
|
// Licensed under GPLv2+
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#include "Common/CommonTypes.h"
|
||||||
|
|
||||||
#include "VideoBackends/D3D/BoundingBox.h"
|
#include "VideoBackends/D3D/BoundingBox.h"
|
||||||
#include "VideoBackends/D3D/D3DBase.h"
|
#include "VideoBackends/D3D/D3DBase.h"
|
||||||
#include "VideoBackends/D3D/D3DState.h"
|
#include "VideoBackends/D3D/D3DState.h"
|
||||||
|
@ -14,13 +16,9 @@
|
||||||
#include "VideoCommon/BoundingBox.h"
|
#include "VideoCommon/BoundingBox.h"
|
||||||
#include "VideoCommon/Debugger.h"
|
#include "VideoCommon/Debugger.h"
|
||||||
#include "VideoCommon/IndexGenerator.h"
|
#include "VideoCommon/IndexGenerator.h"
|
||||||
#include "VideoCommon/MainBase.h"
|
|
||||||
#include "VideoCommon/PixelShaderManager.h"
|
|
||||||
#include "VideoCommon/RenderBase.h"
|
#include "VideoCommon/RenderBase.h"
|
||||||
#include "VideoCommon/Statistics.h"
|
#include "VideoCommon/Statistics.h"
|
||||||
#include "VideoCommon/TextureCacheBase.h"
|
|
||||||
#include "VideoCommon/VertexLoaderManager.h"
|
#include "VideoCommon/VertexLoaderManager.h"
|
||||||
#include "VideoCommon/VertexShaderManager.h"
|
|
||||||
#include "VideoCommon/VideoConfig.h"
|
#include "VideoCommon/VideoConfig.h"
|
||||||
|
|
||||||
namespace DX11
|
namespace DX11
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include "Common/CommonTypes.h"
|
||||||
#include "Common/FileUtil.h"
|
#include "Common/FileUtil.h"
|
||||||
#include "Common/LinearDiskCache.h"
|
#include "Common/LinearDiskCache.h"
|
||||||
#include "Common/StringUtil.h"
|
#include "Common/StringUtil.h"
|
||||||
|
@ -11,7 +12,6 @@
|
||||||
#include "Core/ConfigManager.h"
|
#include "Core/ConfigManager.h"
|
||||||
|
|
||||||
#include "VideoBackends/D3D/D3DShader.h"
|
#include "VideoBackends/D3D/D3DShader.h"
|
||||||
#include "VideoBackends/D3D/Globals.h"
|
|
||||||
#include "VideoBackends/D3D/VertexShaderCache.h"
|
#include "VideoBackends/D3D/VertexShaderCache.h"
|
||||||
|
|
||||||
#include "VideoCommon/Debugger.h"
|
#include "VideoCommon/Debugger.h"
|
||||||
|
|
|
@ -5,22 +5,20 @@
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include "Common/CommonTypes.h"
|
||||||
#include "Common/FileUtil.h"
|
#include "Common/FileUtil.h"
|
||||||
#include "Common/IniFile.h"
|
|
||||||
#include "Common/StringUtil.h"
|
#include "Common/StringUtil.h"
|
||||||
#include "Common/Logging/LogManager.h"
|
|
||||||
|
|
||||||
#include "Core/ConfigManager.h"
|
#include "Core/ConfigManager.h"
|
||||||
#include "Core/Core.h"
|
|
||||||
#include "Core/Host.h"
|
#include "Core/Host.h"
|
||||||
|
|
||||||
#include "VideoBackends/D3D/BoundingBox.h"
|
#include "VideoBackends/D3D/BoundingBox.h"
|
||||||
#include "VideoBackends/D3D/D3DBase.h"
|
#include "VideoBackends/D3D/D3DBase.h"
|
||||||
#include "VideoBackends/D3D/D3DUtil.h"
|
#include "VideoBackends/D3D/D3DUtil.h"
|
||||||
#include "VideoBackends/D3D/GeometryShaderCache.h"
|
#include "VideoBackends/D3D/GeometryShaderCache.h"
|
||||||
#include "VideoBackends/D3D/Globals.h"
|
|
||||||
#include "VideoBackends/D3D/PerfQuery.h"
|
#include "VideoBackends/D3D/PerfQuery.h"
|
||||||
#include "VideoBackends/D3D/PixelShaderCache.h"
|
#include "VideoBackends/D3D/PixelShaderCache.h"
|
||||||
|
#include "VideoBackends/D3D/Render.h"
|
||||||
#include "VideoBackends/D3D/TextureCache.h"
|
#include "VideoBackends/D3D/TextureCache.h"
|
||||||
#include "VideoBackends/D3D/VertexManager.h"
|
#include "VideoBackends/D3D/VertexManager.h"
|
||||||
#include "VideoBackends/D3D/VertexShaderCache.h"
|
#include "VideoBackends/D3D/VertexShaderCache.h"
|
||||||
|
@ -31,7 +29,6 @@
|
||||||
#include "VideoCommon/Fifo.h"
|
#include "VideoCommon/Fifo.h"
|
||||||
#include "VideoCommon/GeometryShaderManager.h"
|
#include "VideoCommon/GeometryShaderManager.h"
|
||||||
#include "VideoCommon/IndexGenerator.h"
|
#include "VideoCommon/IndexGenerator.h"
|
||||||
#include "VideoCommon/OnScreenDisplay.h"
|
|
||||||
#include "VideoCommon/OpcodeDecoding.h"
|
#include "VideoCommon/OpcodeDecoding.h"
|
||||||
#include "VideoCommon/PixelEngine.h"
|
#include "VideoCommon/PixelEngine.h"
|
||||||
#include "VideoCommon/PixelShaderManager.h"
|
#include "VideoCommon/PixelShaderManager.h"
|
||||||
|
@ -163,8 +160,7 @@ bool VideoBackend::Initialize(void *window_handle)
|
||||||
UpdateActiveConfig();
|
UpdateActiveConfig();
|
||||||
|
|
||||||
m_window_handle = window_handle;
|
m_window_handle = window_handle;
|
||||||
|
m_initialized = true;
|
||||||
s_BackendInitialized = true;
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -200,7 +196,7 @@ void VideoBackend::Video_Prepare()
|
||||||
|
|
||||||
void VideoBackend::Shutdown()
|
void VideoBackend::Shutdown()
|
||||||
{
|
{
|
||||||
s_BackendInitialized = false;
|
m_initialized = false;
|
||||||
|
|
||||||
// TODO: should be in Video_Cleanup
|
// TODO: should be in Video_Cleanup
|
||||||
if (g_renderer)
|
if (g_renderer)
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
// Copyright 2008 Dolphin Emulator Project
|
|
||||||
// Licensed under GPLv2+
|
|
||||||
// Refer to the license.txt file included.
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "VideoBackends/D3D/Render.h"
|
|
||||||
#include "VideoCommon/MainBase.h"
|
|
|
@ -53,7 +53,6 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="BoundingBox.h" />
|
<ClInclude Include="BoundingBox.h" />
|
||||||
<ClInclude Include="FramebufferManager.h" />
|
<ClInclude Include="FramebufferManager.h" />
|
||||||
<ClInclude Include="main.h" />
|
|
||||||
<ClInclude Include="PerfQuery.h" />
|
<ClInclude Include="PerfQuery.h" />
|
||||||
<ClInclude Include="PostProcessing.h" />
|
<ClInclude Include="PostProcessing.h" />
|
||||||
<ClInclude Include="ProgramShaderCache.h" />
|
<ClInclude Include="ProgramShaderCache.h" />
|
||||||
|
|
|
@ -88,7 +88,6 @@
|
||||||
<ClInclude Include="TextureCache.h">
|
<ClInclude Include="TextureCache.h">
|
||||||
<Filter>Render</Filter>
|
<Filter>Render</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="main.h" />
|
|
||||||
<ClInclude Include="SamplerCache.h" />
|
<ClInclude Include="SamplerCache.h" />
|
||||||
<ClInclude Include="VideoBackend.h" />
|
<ClInclude Include="VideoBackend.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -11,12 +11,10 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "Common/Atomic.h"
|
#include "Common/Atomic.h"
|
||||||
#include "Common/CommonPaths.h"
|
#include "Common/CommonTypes.h"
|
||||||
#include "Common/FileUtil.h"
|
#include "Common/FileUtil.h"
|
||||||
#include "Common/MathUtil.h"
|
#include "Common/MathUtil.h"
|
||||||
#include "Common/StringUtil.h"
|
#include "Common/StringUtil.h"
|
||||||
#include "Common/Thread.h"
|
|
||||||
#include "Common/Timer.h"
|
|
||||||
#include "Common/GL/GLInterfaceBase.h"
|
#include "Common/GL/GLInterfaceBase.h"
|
||||||
#include "Common/GL/GLUtil.h"
|
#include "Common/GL/GLUtil.h"
|
||||||
#include "Common/Logging/LogManager.h"
|
#include "Common/Logging/LogManager.h"
|
||||||
|
@ -26,28 +24,21 @@
|
||||||
|
|
||||||
#include "VideoBackends/OGL/BoundingBox.h"
|
#include "VideoBackends/OGL/BoundingBox.h"
|
||||||
#include "VideoBackends/OGL/FramebufferManager.h"
|
#include "VideoBackends/OGL/FramebufferManager.h"
|
||||||
#include "VideoBackends/OGL/main.h"
|
|
||||||
#include "VideoBackends/OGL/PostProcessing.h"
|
#include "VideoBackends/OGL/PostProcessing.h"
|
||||||
#include "VideoBackends/OGL/ProgramShaderCache.h"
|
#include "VideoBackends/OGL/ProgramShaderCache.h"
|
||||||
#include "VideoBackends/OGL/RasterFont.h"
|
#include "VideoBackends/OGL/RasterFont.h"
|
||||||
#include "VideoBackends/OGL/Render.h"
|
#include "VideoBackends/OGL/Render.h"
|
||||||
#include "VideoBackends/OGL/SamplerCache.h"
|
#include "VideoBackends/OGL/SamplerCache.h"
|
||||||
#include "VideoBackends/OGL/StreamBuffer.h"
|
|
||||||
#include "VideoBackends/OGL/TextureCache.h"
|
#include "VideoBackends/OGL/TextureCache.h"
|
||||||
#include "VideoBackends/OGL/TextureConverter.h"
|
|
||||||
#include "VideoBackends/OGL/VertexManager.h"
|
#include "VideoBackends/OGL/VertexManager.h"
|
||||||
|
|
||||||
#include "VideoCommon/BPFunctions.h"
|
#include "VideoCommon/BPFunctions.h"
|
||||||
#include "VideoCommon/BPStructs.h"
|
|
||||||
#include "VideoCommon/DriverDetails.h"
|
#include "VideoCommon/DriverDetails.h"
|
||||||
#include "VideoCommon/Fifo.h"
|
#include "VideoCommon/Fifo.h"
|
||||||
#include "VideoCommon/ImageWrite.h"
|
#include "VideoCommon/ImageWrite.h"
|
||||||
#include "VideoCommon/OnScreenDisplay.h"
|
#include "VideoCommon/OnScreenDisplay.h"
|
||||||
#include "VideoCommon/PixelEngine.h"
|
#include "VideoCommon/PixelEngine.h"
|
||||||
#include "VideoCommon/PixelShaderManager.h"
|
#include "VideoCommon/PixelShaderManager.h"
|
||||||
#include "VideoCommon/Statistics.h"
|
|
||||||
#include "VideoCommon/VertexLoaderManager.h"
|
|
||||||
#include "VideoCommon/VertexShaderGen.h"
|
|
||||||
#include "VideoCommon/VertexShaderManager.h"
|
#include "VideoCommon/VertexShaderManager.h"
|
||||||
#include "VideoCommon/VideoConfig.h"
|
#include "VideoCommon/VideoConfig.h"
|
||||||
|
|
||||||
|
|
|
@ -7,28 +7,20 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "Common/Common.h"
|
#include "Common/CommonTypes.h"
|
||||||
#include "Common/FileUtil.h"
|
#include "Common/FileUtil.h"
|
||||||
#include "Common/MemoryUtil.h"
|
|
||||||
#include "Common/StringUtil.h"
|
#include "Common/StringUtil.h"
|
||||||
|
#include "Common/GL/GLExtensions/GLExtensions.h"
|
||||||
|
|
||||||
#include "VideoBackends/OGL/main.h"
|
|
||||||
#include "VideoBackends/OGL/ProgramShaderCache.h"
|
#include "VideoBackends/OGL/ProgramShaderCache.h"
|
||||||
#include "VideoBackends/OGL/Render.h"
|
#include "VideoBackends/OGL/Render.h"
|
||||||
#include "VideoBackends/OGL/StreamBuffer.h"
|
#include "VideoBackends/OGL/StreamBuffer.h"
|
||||||
#include "VideoBackends/OGL/TextureCache.h"
|
|
||||||
#include "VideoBackends/OGL/VertexManager.h"
|
#include "VideoBackends/OGL/VertexManager.h"
|
||||||
|
|
||||||
#include "VideoCommon/BPMemory.h"
|
#include "VideoCommon/BPMemory.h"
|
||||||
#include "VideoCommon/DriverDetails.h"
|
|
||||||
#include "VideoCommon/Fifo.h"
|
|
||||||
#include "VideoCommon/ImageWrite.h"
|
|
||||||
#include "VideoCommon/IndexGenerator.h"
|
#include "VideoCommon/IndexGenerator.h"
|
||||||
#include "VideoCommon/PixelShaderManager.h"
|
|
||||||
#include "VideoCommon/Statistics.h"
|
#include "VideoCommon/Statistics.h"
|
||||||
#include "VideoCommon/VertexLoaderManager.h"
|
#include "VideoCommon/VertexLoaderManager.h"
|
||||||
#include "VideoCommon/VertexShaderGen.h"
|
|
||||||
#include "VideoCommon/VertexShaderManager.h"
|
|
||||||
#include "VideoCommon/VideoConfig.h"
|
#include "VideoCommon/VideoConfig.h"
|
||||||
|
|
||||||
namespace OGL
|
namespace OGL
|
||||||
|
|
|
@ -4,9 +4,6 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Common/GL/GLExtensions/GLExtensions.h"
|
|
||||||
|
|
||||||
#include "VideoCommon/CPMemory.h"
|
|
||||||
#include "VideoCommon/NativeVertexFormat.h"
|
#include "VideoCommon/NativeVertexFormat.h"
|
||||||
#include "VideoCommon/VertexManagerBase.h"
|
#include "VideoCommon/VertexManagerBase.h"
|
||||||
|
|
||||||
|
|
|
@ -36,26 +36,21 @@ Make AA apply instantly during gameplay if possible
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <algorithm>
|
|
||||||
#include <cstdarg>
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include "Common/Atomic.h"
|
#include "Common/Atomic.h"
|
||||||
#include "Common/CommonPaths.h"
|
#include "Common/CommonPaths.h"
|
||||||
#include "Common/FileSearch.h"
|
#include "Common/FileSearch.h"
|
||||||
#include "Common/Thread.h"
|
|
||||||
#include "Common/GL/GLInterfaceBase.h"
|
#include "Common/GL/GLInterfaceBase.h"
|
||||||
#include "Common/GL/GLUtil.h"
|
#include "Common/GL/GLUtil.h"
|
||||||
#include "Common/Logging/LogManager.h"
|
|
||||||
|
|
||||||
#include "Core/ConfigManager.h"
|
#include "Core/ConfigManager.h"
|
||||||
#include "Core/Core.h"
|
|
||||||
#include "Core/Host.h"
|
#include "Core/Host.h"
|
||||||
|
|
||||||
#include "VideoBackends/OGL/BoundingBox.h"
|
#include "VideoBackends/OGL/BoundingBox.h"
|
||||||
#include "VideoBackends/OGL/FramebufferManager.h"
|
|
||||||
#include "VideoBackends/OGL/PerfQuery.h"
|
#include "VideoBackends/OGL/PerfQuery.h"
|
||||||
#include "VideoBackends/OGL/PostProcessing.h"
|
|
||||||
#include "VideoBackends/OGL/ProgramShaderCache.h"
|
#include "VideoBackends/OGL/ProgramShaderCache.h"
|
||||||
#include "VideoBackends/OGL/Render.h"
|
#include "VideoBackends/OGL/Render.h"
|
||||||
#include "VideoBackends/OGL/SamplerCache.h"
|
#include "VideoBackends/OGL/SamplerCache.h"
|
||||||
|
@ -68,10 +63,7 @@ Make AA apply instantly during gameplay if possible
|
||||||
#include "VideoCommon/CommandProcessor.h"
|
#include "VideoCommon/CommandProcessor.h"
|
||||||
#include "VideoCommon/Fifo.h"
|
#include "VideoCommon/Fifo.h"
|
||||||
#include "VideoCommon/GeometryShaderManager.h"
|
#include "VideoCommon/GeometryShaderManager.h"
|
||||||
#include "VideoCommon/ImageWrite.h"
|
|
||||||
#include "VideoCommon/IndexGenerator.h"
|
#include "VideoCommon/IndexGenerator.h"
|
||||||
#include "VideoCommon/LookUpTables.h"
|
|
||||||
#include "VideoCommon/MainBase.h"
|
|
||||||
#include "VideoCommon/OnScreenDisplay.h"
|
#include "VideoCommon/OnScreenDisplay.h"
|
||||||
#include "VideoCommon/OpcodeDecoding.h"
|
#include "VideoCommon/OpcodeDecoding.h"
|
||||||
#include "VideoCommon/PixelEngine.h"
|
#include "VideoCommon/PixelEngine.h"
|
||||||
|
@ -79,7 +71,6 @@ Make AA apply instantly during gameplay if possible
|
||||||
#include "VideoCommon/VertexLoaderManager.h"
|
#include "VideoCommon/VertexLoaderManager.h"
|
||||||
#include "VideoCommon/VertexShaderManager.h"
|
#include "VideoCommon/VertexShaderManager.h"
|
||||||
#include "VideoCommon/VideoConfig.h"
|
#include "VideoCommon/VideoConfig.h"
|
||||||
#include "VideoCommon/VideoState.h"
|
|
||||||
|
|
||||||
namespace OGL
|
namespace OGL
|
||||||
{
|
{
|
||||||
|
@ -139,14 +130,15 @@ static void InitBackendInfo()
|
||||||
g_Config.backend_info.AnaglyphShaders = GetShaders(ANAGLYPH_DIR DIR_SEP);
|
g_Config.backend_info.AnaglyphShaders = GetShaders(ANAGLYPH_DIR DIR_SEP);
|
||||||
}
|
}
|
||||||
|
|
||||||
void VideoBackend::ShowConfig(void *_hParent)
|
void VideoBackend::ShowConfig(void* parent_handle)
|
||||||
{
|
{
|
||||||
if (!s_BackendInitialized)
|
if (!m_initialized)
|
||||||
InitBackendInfo();
|
InitBackendInfo();
|
||||||
Host_ShowVideoConfig(_hParent, GetDisplayName(), "gfx_opengl");
|
|
||||||
|
Host_ShowVideoConfig(parent_handle, GetDisplayName(), "gfx_opengl");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool VideoBackend::Initialize(void *window_handle)
|
bool VideoBackend::Initialize(void* window_handle)
|
||||||
{
|
{
|
||||||
InitializeShared();
|
InitializeShared();
|
||||||
InitBackendInfo();
|
InitBackendInfo();
|
||||||
|
@ -167,7 +159,7 @@ bool VideoBackend::Initialize(void *window_handle)
|
||||||
// Do our OSD callbacks
|
// Do our OSD callbacks
|
||||||
OSD::DoCallbacks(OSD::OSD_INIT);
|
OSD::DoCallbacks(OSD::OSD_INIT);
|
||||||
|
|
||||||
s_BackendInitialized = true;
|
m_initialized = true;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -206,7 +198,7 @@ void VideoBackend::Video_Prepare()
|
||||||
|
|
||||||
void VideoBackend::Shutdown()
|
void VideoBackend::Shutdown()
|
||||||
{
|
{
|
||||||
s_BackendInitialized = false;
|
m_initialized = false;
|
||||||
|
|
||||||
// Do our OSD callbacks
|
// Do our OSD callbacks
|
||||||
OSD::DoCallbacks(OSD::OSD_SHUTDOWN);
|
OSD::DoCallbacks(OSD::OSD_SHUTDOWN);
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
// Copyright 2008 Dolphin Emulator Project
|
|
||||||
// Licensed under GPLv2+
|
|
||||||
// Refer to the license.txt file included.
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
#include "VideoCommon/MainBase.h"
|
|
|
@ -86,6 +86,7 @@ bool VideoSoftware::Initialize(void *window_handle)
|
||||||
SWRenderer::Init();
|
SWRenderer::Init();
|
||||||
DebugUtil::Init();
|
DebugUtil::Init();
|
||||||
|
|
||||||
|
m_initialized = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,6 +146,8 @@ void VideoSoftware::EmuStateChange(EMUSTATE_CHANGE newState)
|
||||||
|
|
||||||
void VideoSoftware::Shutdown()
|
void VideoSoftware::Shutdown()
|
||||||
{
|
{
|
||||||
|
m_initialized = false;
|
||||||
|
|
||||||
// TODO: should be in Video_Cleanup
|
// TODO: should be in Video_Cleanup
|
||||||
SWRenderer::Shutdown();
|
SWRenderer::Shutdown();
|
||||||
DebugUtil::Shutdown();
|
DebugUtil::Shutdown();
|
||||||
|
|
|
@ -2,19 +2,16 @@
|
||||||
// Licensed under GPLv2+
|
// Licensed under GPLv2+
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
#include "Common/Common.h"
|
#include "Common/CommonTypes.h"
|
||||||
#include "Common/Event.h"
|
#include "Common/Event.h"
|
||||||
|
#include "Common/Flag.h"
|
||||||
#include "Core/ConfigManager.h"
|
#include "Core/ConfigManager.h"
|
||||||
|
|
||||||
#include "VideoCommon/AsyncRequests.h"
|
#include "VideoCommon/AsyncRequests.h"
|
||||||
#include "VideoCommon/BoundingBox.h"
|
|
||||||
#include "VideoCommon/BPStructs.h"
|
#include "VideoCommon/BPStructs.h"
|
||||||
#include "VideoCommon/CommandProcessor.h"
|
#include "VideoCommon/CommandProcessor.h"
|
||||||
#include "VideoCommon/Fifo.h"
|
#include "VideoCommon/Fifo.h"
|
||||||
#include "VideoCommon/FramebufferManagerBase.h"
|
|
||||||
#include "VideoCommon/MainBase.h"
|
|
||||||
#include "VideoCommon/OnScreenDisplay.h"
|
#include "VideoCommon/OnScreenDisplay.h"
|
||||||
#include "VideoCommon/PixelEngine.h"
|
|
||||||
#include "VideoCommon/RenderBase.h"
|
#include "VideoCommon/RenderBase.h"
|
||||||
#include "VideoCommon/TextureCacheBase.h"
|
#include "VideoCommon/TextureCacheBase.h"
|
||||||
#include "VideoCommon/VertexLoaderManager.h"
|
#include "VideoCommon/VertexLoaderManager.h"
|
||||||
|
@ -22,8 +19,6 @@
|
||||||
#include "VideoCommon/VideoConfig.h"
|
#include "VideoCommon/VideoConfig.h"
|
||||||
#include "VideoCommon/VideoState.h"
|
#include "VideoCommon/VideoState.h"
|
||||||
|
|
||||||
bool s_BackendInitialized = false;
|
|
||||||
|
|
||||||
static Common::Flag s_FifoShuttingDown;
|
static Common::Flag s_FifoShuttingDown;
|
||||||
|
|
||||||
static volatile struct
|
static volatile struct
|
||||||
|
@ -59,7 +54,7 @@ void VideoBackendHardware::Video_SetRendering(bool bEnabled)
|
||||||
// Run from the CPU thread (from VideoInterface.cpp)
|
// Run from the CPU thread (from VideoInterface.cpp)
|
||||||
void VideoBackendHardware::Video_BeginField(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight)
|
void VideoBackendHardware::Video_BeginField(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight)
|
||||||
{
|
{
|
||||||
if (s_BackendInitialized && g_ActiveConfig.bUseXFB)
|
if (m_initialized && g_ActiveConfig.bUseXFB)
|
||||||
{
|
{
|
||||||
s_beginFieldArgs.xfbAddr = xfbAddr;
|
s_beginFieldArgs.xfbAddr = xfbAddr;
|
||||||
s_beginFieldArgs.fbWidth = fbWidth;
|
s_beginFieldArgs.fbWidth = fbWidth;
|
||||||
|
@ -71,7 +66,7 @@ void VideoBackendHardware::Video_BeginField(u32 xfbAddr, u32 fbWidth, u32 fbStri
|
||||||
// Run from the CPU thread (from VideoInterface.cpp)
|
// Run from the CPU thread (from VideoInterface.cpp)
|
||||||
void VideoBackendHardware::Video_EndField()
|
void VideoBackendHardware::Video_EndField()
|
||||||
{
|
{
|
||||||
if (s_BackendInitialized && g_ActiveConfig.bUseXFB && g_renderer)
|
if (m_initialized && g_ActiveConfig.bUseXFB && g_renderer)
|
||||||
{
|
{
|
||||||
SyncGPU(SYNC_GPU_SWAP);
|
SyncGPU(SYNC_GPU_SWAP);
|
||||||
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
// Copyright 2010 Dolphin Emulator Project
|
|
||||||
// Licensed under GPLv2+
|
|
||||||
// Refer to the license.txt file included.
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "Common/CommonTypes.h"
|
|
||||||
#include "Common/Flag.h"
|
|
||||||
|
|
||||||
extern bool s_BackendInitialized;
|
|
|
@ -17,7 +17,6 @@
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "Common/Atomic.h"
|
|
||||||
#include "Common/Event.h"
|
#include "Common/Event.h"
|
||||||
#include "Common/Profiler.h"
|
#include "Common/Profiler.h"
|
||||||
#include "Common/StringUtil.h"
|
#include "Common/StringUtil.h"
|
||||||
|
@ -36,11 +35,8 @@
|
||||||
#include "VideoCommon/CommandProcessor.h"
|
#include "VideoCommon/CommandProcessor.h"
|
||||||
#include "VideoCommon/CPMemory.h"
|
#include "VideoCommon/CPMemory.h"
|
||||||
#include "VideoCommon/Debugger.h"
|
#include "VideoCommon/Debugger.h"
|
||||||
#include "VideoCommon/Fifo.h"
|
|
||||||
#include "VideoCommon/FPSCounter.h"
|
#include "VideoCommon/FPSCounter.h"
|
||||||
#include "VideoCommon/FramebufferManagerBase.h"
|
#include "VideoCommon/FramebufferManagerBase.h"
|
||||||
#include "VideoCommon/MainBase.h"
|
|
||||||
#include "VideoCommon/OpcodeDecoding.h"
|
|
||||||
#include "VideoCommon/PostProcessing.h"
|
#include "VideoCommon/PostProcessing.h"
|
||||||
#include "VideoCommon/RenderBase.h"
|
#include "VideoCommon/RenderBase.h"
|
||||||
#include "VideoCommon/Statistics.h"
|
#include "VideoCommon/Statistics.h"
|
||||||
|
|
|
@ -10,13 +10,11 @@
|
||||||
#include "VideoCommon/Debugger.h"
|
#include "VideoCommon/Debugger.h"
|
||||||
#include "VideoCommon/GeometryShaderManager.h"
|
#include "VideoCommon/GeometryShaderManager.h"
|
||||||
#include "VideoCommon/IndexGenerator.h"
|
#include "VideoCommon/IndexGenerator.h"
|
||||||
#include "VideoCommon/MainBase.h"
|
|
||||||
#include "VideoCommon/NativeVertexFormat.h"
|
#include "VideoCommon/NativeVertexFormat.h"
|
||||||
#include "VideoCommon/OpcodeDecoding.h"
|
#include "VideoCommon/OpcodeDecoding.h"
|
||||||
#include "VideoCommon/PerfQueryBase.h"
|
#include "VideoCommon/PerfQueryBase.h"
|
||||||
#include "VideoCommon/PixelShaderManager.h"
|
#include "VideoCommon/PixelShaderManager.h"
|
||||||
#include "VideoCommon/RenderBase.h"
|
#include "VideoCommon/RenderBase.h"
|
||||||
#include "VideoCommon/Statistics.h"
|
|
||||||
#include "VideoCommon/TextureCacheBase.h"
|
#include "VideoCommon/TextureCacheBase.h"
|
||||||
#include "VideoCommon/VertexLoaderManager.h"
|
#include "VideoCommon/VertexLoaderManager.h"
|
||||||
#include "VideoCommon/VertexManagerBase.h"
|
#include "VideoCommon/VertexManagerBase.h"
|
||||||
|
|
|
@ -66,7 +66,7 @@ public:
|
||||||
|
|
||||||
virtual unsigned int PeekMessages() = 0;
|
virtual unsigned int PeekMessages() = 0;
|
||||||
|
|
||||||
virtual bool Initialize(void *window_handle) = 0;
|
virtual bool Initialize(void* window_handle) = 0;
|
||||||
virtual void Shutdown() = 0;
|
virtual void Shutdown() = 0;
|
||||||
virtual void RunLoop(bool enable) = 0;
|
virtual void RunLoop(bool enable) = 0;
|
||||||
|
|
||||||
|
@ -115,6 +115,9 @@ public:
|
||||||
virtual void CheckInvalidState() = 0;
|
virtual void CheckInvalidState() = 0;
|
||||||
|
|
||||||
virtual void UpdateWantDeterminism(bool want) {}
|
virtual void UpdateWantDeterminism(bool want) {}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
bool m_initialized = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern std::vector<VideoBackend*> g_available_video_backends;
|
extern std::vector<VideoBackend*> g_available_video_backends;
|
||||||
|
|
|
@ -104,7 +104,6 @@
|
||||||
<ClInclude Include="IndexGenerator.h" />
|
<ClInclude Include="IndexGenerator.h" />
|
||||||
<ClInclude Include="LightingShaderGen.h" />
|
<ClInclude Include="LightingShaderGen.h" />
|
||||||
<ClInclude Include="LookUpTables.h" />
|
<ClInclude Include="LookUpTables.h" />
|
||||||
<ClInclude Include="MainBase.h" />
|
|
||||||
<ClInclude Include="NativeVertexFormat.h" />
|
<ClInclude Include="NativeVertexFormat.h" />
|
||||||
<ClInclude Include="OnScreenDisplay.h" />
|
<ClInclude Include="OnScreenDisplay.h" />
|
||||||
<ClInclude Include="OpcodeDecoding.h" />
|
<ClInclude Include="OpcodeDecoding.h" />
|
||||||
|
|
|
@ -173,9 +173,6 @@
|
||||||
<ClInclude Include="FramebufferManagerBase.h">
|
<ClInclude Include="FramebufferManagerBase.h">
|
||||||
<Filter>Base</Filter>
|
<Filter>Base</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="MainBase.h">
|
|
||||||
<Filter>Base</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="PerfQueryBase.h">
|
<ClInclude Include="PerfQueryBase.h">
|
||||||
<Filter>Base</Filter>
|
<Filter>Base</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
|
Loading…
Reference in New Issue